Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception handling

 
Cecilia Anderson
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I�m wondering about how to handle system exceptions, like if you remove the db file .... should you inform the user and shut down the application. What are the requirements for exception handling???
//Cecilia
 
Abhinav Anand
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If the db.db file is removed from the specified location before the server or client is started then I think that your program should inform the user either by displaying a message in the command window or by displaying a dialog box.
By the way if the db.db is in use by the server or the client then I don't think that the underlying OS would allow anybody to delete/move that concerned file as because it is in use.
Regarding exceptions the assignment instruction states that a certain amount of score is granted for exceptions so i think that one has to define a more generic and userfriendly error messages by using the exception handling mechanism.
Hope it helps..
Thanks,
Any suggetions are welcome.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cecilia.
Welcome to JavaRanch, and to the SCJD Forum. JavaRanch has a Naming Policy that requires first and last names.
Unfortunately I am at home right now, or this post would have a link for you to the policy and where you can change you name at.
You can change it
here.
Thanks and good luck on the assignment, we are all here for you.
Mark
[ May 06, 2002: Message edited by: Mark Spritzler ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic