FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 403 : loadImage() throwing error that can't be caught with try/catch
Last modified: 2006-10-04 10:10
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P3
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
megamu
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2006-09-30 17:50
Processing 116!
try{
img = loadImage(url);
}
catch(RuntimeException e){
}
If the url is 404, then this code will still throw a runtime exception and lock the program. Code
in the catch will actually execute before the exception locks the program.
Additional Comment
#1 From fry 2006-09-30 18:01
does the same code work with 0115?
can you post more complete code, i can't replicate from the sample you've
given. archive the sketch and attach to the report if that will work.
Additional Comment
#2 From fry 2006-10-04 10:10
found and fixed. the issue was that in Java 1.5 (versus 1.4), a URL that's
a 404 throws a FileNotFoundException instead of an IOException. now
properly catching the exception on openStream.