aspose file tools*
The moose likes Beginning Java and the fly likes own unchecked exception...? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "own unchecked exception...?" Watch "own unchecked exception...?" New topic
Author

own unchecked exception...?

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
Dear all
How to create my own unchecked exception in java ?


Creativity is nothing but Breaking Rules
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

By extending Exception:


[My Blog]
All roads lead to JavaRanch
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
I think that'll create a checked exception..

Create a class extending RuntimeException.

If you want to convert a checked exception thrown at you to a RuntimeException, you could...

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
i want to extend RunTime exception right
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Yep, its the mother of all unchecked exceptions..
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I think that'll create a checked exception..

Dooh, I had checked exceptions in mind. Sorry.
santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
Thanks all
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: own unchecked exception...?
 
Similar Threads
Exception
excetion
exceptions
NumberFormatException
User defined exceptions