FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   loadImage file-not-found trap missed
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: loadImage file-not-found trap missed  (Read 278 times)
battey

WWW
loadImage file-not-found trap missed
« on: Nov 15th, 2003, 4:13am »

alpha 67
 
This code generates an error, as one would expect, since the target file isn't around:
 
Code:

BImage b = loadImage("notThere.jpg");  

 
The following code returns a NullPointerException (as does any code that tries to access the BImage object, as far as I can tell). Unfortunately, if one isn't aware that one's loadImage is pointing at a non-entity, one could spend a terrible amount of time trying to figure out what else in one's code is generating the Exception!
 
Code:

BImage b = loadImage("notThere.jpg");  
int c=b.pixels[3];
 
fry


WWW
Re: loadImage file-not-found trap missed
« Reply #1 on: Nov 23rd, 2003, 11:45pm »

but doesn't it give you the loadImage error first?
 
Pages: 1 

« Previous topic | Next topic »