Hi All,

I had a basic questions abt catching exceptions.

I am running an application written in TCl. I am using Tclblend to integrate
with another java application.

Now for instance I am doing the following
Now consider the following cases

Case 1
-------
set err [catch {set file [java::new java.io.FileInputStream $x]} errMsg]
if {$err} {java::throw [java::new java.io.FileNotFoundException "file not 
found"]}

Case 2
--------
Now lets us say that I don't catch the exception in the code and just
have the code as follows

set file [java::new java.io.FileInputStream $x]

And let us say $x is not a valid file.

I get an error message with the "FileNotFoundException" returned to me
regardless in both the cases.

Now I am a bit confused as to when I should need to catch and when I don't
need to catch the exceptions. If Tclblend is anyway going to catch the
exception, is there a need for me to put a catch and use
java::throw to throw the exception.

I an running into this "do I need to" situation quite a few times and I am
giving this example

I am using Tclblend 1.2.3, JDK 1.1.6, Tcl 8.0.5 in Solaris.

Any help is appreciated.
thanks
Suvarna


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 
A list archive is at: http://www.findmail.com/listsaver/tcldallas/

Reply via email to