swathi bairu wrote:I have a static block which is checking if the DB2 driver is loaded using a try catch block. If it not loaded, I am trying to throw the Throwable object...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
No, Throwable is checked.Tim Holloway wrote:. . . Throwable and RuntimeException are unchecked exceptions . . .
The API for Throwable wrote:. . . For the purposes of compile-time checking of exceptions, Throwable and any subclass of Throwable that is not also a subclass of either RuntimeException or Error are regarded as checked exceptions. . . .
Winston Gutkowski wrote:
Any particular reason why?
Please show us that is good practice.swathi bairu wrote:. . . This class gets called by a shell script in a batch environment. . . .
swathi bairu wrote:This class gets called by a shell script in a batch environment. So for logging purposes, I want to throw this Throwable object.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
This sounds like "noise" code to me; so don't do anything until you can explain to US (or your boss) why you think you need to. Or unless you've been TOLD to do it - and even then, it might be worth raising a query.
swathi bairu wrote:I am not sure if this is a good practice. But this is how I was told to do by my lead.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here