aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes SCJD Beta: db exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "SCJD Beta: db exceptions" Watch "SCJD Beta: db exceptions" New topic
Author

SCJD Beta: db exceptions

Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 5018
    
    8

The DB exceptions are supposed to have two constructors: no-args and one String arg. The 1.4 Exception has two additional constructors that allow you to pass in a Throwable as well. Is anyone adding those to their DB exceptions?
I suppose you could argue that it's above what is asked for in the instructions but I'm thinking those additional constructors may come in useful later (when I actually get around to writing the DB client code )


Junilu - [How to Ask Questions] [How to Answer Questions]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Actually I think using the newer constructor will allow you to wrap the actual exception into a DBException and send it to the client with the entire stack trace a root cause with it. It is called Exception chaining and it was added to 1.4 so I also think that is another reason to use it.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCJD Beta: db exceptions