Please can you help me out with this fairly basic question...
I have several classes that do database queries, and in each method I need to try and catch for every SQLException that can happen. Instead of doing this can I create my own SQLException class that will just print out errors to the output screen. Then each method in the other classes can just throw the SQLException and won't need lots of try and catches.
The problem is that I can't get this to work! If it is possible to do this, or something like this, please can you tell me how.
Thanks very much in advance.
I have several classes that do database queries, and in each method I need to try and catch for every SQLException that can happen. Instead of doing this can I create my own SQLException class that will just print out errors to the output screen. Then each method in the other classes can just throw the SQLException and won't need lots of try and catches.
The problem is that I can't get this to work! If it is possible to do this, or something like this, please can you tell me how.
Thanks very much in advance.