Results 1 to 1 of 1
Thread: Defining own Exception
-
Defining own Exception
Sometimes it is useful to define your own Exceptions. It is required if non of the Exceptions defined in Java platform suites you. Obviously this can be bypassed if you simply use if conditions in you program but this will make you code look complicated. For a clean and efficient code, defining own Exception is the ideal way.
mandatory exception handling not required
Java Code:public class InvalidId extends RuntimeException { ... }
mandatory exception handling required
Java Code:public class InvalidId extends Exception{ ... }
Similar Threads
-
JDO - defining the persistence using metadata
By Java Tip in forum Java TipReplies: 0Last Post: 03-17-2008, 07:50 AM -
Defining a Native Method
By Java Tip in forum Java TipReplies: 0Last Post: 12-23-2007, 07:44 AM -
defining own exception
By javaplus in forum New To JavaReplies: 2Last Post: 11-12-2007, 12:47 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks