Skip to main content
gamedev.net
🔒 Locked

[java] Quick question about exceptions

Started by draqza Dec 4, 2001 at 12:49 PM 0 replies 300+ views
Original Post
draqza
draqza
Basically, I have a try...catch block with statements inside the try that could throw multiple exceptions. For my purposes, however, I know that it won''t ever throw those exceptions, and it''s simply there because Java requires it. So, is it okay to do
  
try{
  .
  .
  .
}
catch(Exception e)
{
  //do something here to report the odd error  

}
  
Or will that not work for some reason? WNDCLASSEX Reality; ... ... Reality.lpfnWndProc=ComputerGames; ... ... RegisterClassEx(&Reality); Unable to register Reality...what''s wrong? --------- Dan Upton http://0to1.org http://www20.brinkster.com/draqza
WNDCLASSEX Reality;......Reality.lpfnWndProc=ComputerGames;......RegisterClassEx(&Reality);Unable to register Reality...what's wrong?---------Dan Uptonhttp://0to1.orghttp://www20.brinkster.com/draqza
Kaijin
Kaijin
Yes, that''s fine. The catch clause will catch all errors that are dervived from the class java.lang.Exception.

- Kaijin

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.