We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › catching loadstrings exceptions
Page Index Toggle Pages: 1
catching loadstrings exceptions (Read 489 times)
catching loadstrings exceptions
Oct 6th, 2006, 6:34am
 
how do i catch exceptions associated with the loadstrings function? or what native java function can i call which has try catch statements associated with it.. im not sure which java functionss loadstrings calls...
Re: catching loadstrings exceptions
Reply #1 - Oct 6th, 2006, 11:46am
 
This will catch any and all exceptions loadStrings could throw, and print the name of the exception.

Code:
String[] data;
try
{
data=loadStrings("foo.txt");
}
catch(Exception e)
{
println(e);
}
Page Index Toggle Pages: 1