File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCJD Beta: db exceptions

 
Junilu Lacar
Bartender
Pie
Posts: 6547
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 )
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic