View Single Post
  #5 (permalink)  
Old 04-30-2008, 03:00 PM
danielstoner's Avatar
danielstoner danielstoner is offline
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 191
danielstoner is on a distinguished road
The cruel reality is you cannot be sure. Maybe there is a typo in the config file and then the instance will not be created. The best thing is to actually treat the error. For example you can check for null: if (f != null) {furnishings.add(f);}
Exception handling is a very heated topic on the net. If you want you can also take a look at my article on the subject: Exceptional Java - Thoughts on Java exceptions | Little Tutorials
__________________
Daniel @ [
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
Language is froth on the surface of thought
Reply With Quote