[vtkusers] Catching VTK exceptions in Java

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Fri Dec 5 04:35:07 EST 2003


That's not quite true, you can catch c++ errors by modifying the wrappers
around each jni call (to catch any C++ exception). These can then throw a
java exception object on the java stack, which can be handled normally by
java. I haven't done this for vtk and it might involve quite a lot of work.

JB



----- Original Message ----- 
From: "Shyam Prakash" <ramakrishna.prakash at quest-global.com>
To: "'Steve Joyce'" <Steve.Joyce at sercoassurance.com>; <vtkusers at vtk.org>
Sent: Friday, December 05, 2003 8:55 AM
Subject: RE: [vtkusers] Catching VTK exceptions in Java


> Steve,
> Any error in vtk library will make your code crash. In java you
> can not catch any errors that are thrown at JNI interfaces.
>
> --Shyam
>
> > -----Original Message-----
> > From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
> Of
> > Steve Joyce
> > Sent: Friday, December 05, 2003 2:16 PM
> > To: vtkusers at vtk.org
> > Subject: [vtkusers] Catching VTK exceptions in Java
> >
> > I am using VTK 4.2.3 with Java wrapping.
> > Is it possible to catch exceptions that are thrown in the VTK
> libraries
> > within Java code?
> > At the moment, if a VTK exception is thrown the Java application just
> > exits.
> > In particular, I'd like to catch out of memory errors, but catching
> any
> > error would be useful.
> >
> > Thanks,
> > Steve
> >
> >
> >
> >
> >
> > ****Disclaimer***********
> > This e-mail and any attachments may contain confidential and/or
> privileged
> > material; it  is for the intended addressee(s) only.  If you are not a
> > named addressee, you must not use, retain or disclose such
> information.
> >
> > Serco cannot guarantee that the e-mail or any attachments are free
> from
> > viruses.
> >
> > The views expressed in this e-mail are those of the originator and do
> not
> > necessarily represent the views of Serco.
> >
> > Nothing in this e-mail shall bind Serco in any contract or obligation.
> >
> > Serco Group plc.  Registered in England and Wales.  No: 2048608
> > Registered Office:  Serco House, 16 Bartley Wood Business Park,
> Bartley
> > Way, Hook, Hampshire, RG27 9UY, United Kingdom.
> > ****End Disclaimer*******
> > <<<<GWIASIG 0.07>>>>
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list