aspose file tools*
The moose likes Beginning Java and the fly likes User Defined Exception problem ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "User Defined Exception problem !" Watch "User Defined Exception problem !" New topic
Author

User Defined Exception problem !

Arun C. Giridharan
Ranch Hand

Joined: Jul 11, 2010
Posts: 96




DriveIllException.java:1: warning: [serial] serializable class IllException has no definition of serialVersionUID


Well i don't understand this warning Message ..Could someone help me out!
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

I don't get any compilation errors. Check it again. BTW, what is the purpose of extending Exception?


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@Arun: It's not an error, it's a warning. Serializable classes are supposed to define a serialVersionUID (for deserialization).

@Abimaran: What's the point of extending exception? To provide application- or API-specific exceptions.
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

David Newton wrote:
@Abimaran: What's the point of extending exception? To provide application- or API-specific exceptions.


I mean here, in this program? :confused:
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39814
    
  28
The IllException is not at all designed to extend an Exception. The point of providing your own Exceptions is to make handling them easier in your project. But that object is never used as an Exception.
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

I want to say in my last post that there is no need of extending the Exception in the OP's code.
Arun C. Giridharan
Ranch Hand

Joined: Jul 11, 2010
Posts: 96
Campbell Ritchie is right!
 
wood burning stoves
 
subject: User Defined Exception problem !