File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 36464
    
  15
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!
 
Don't get me started about those stupid light bulbs.
 
subject: User Defined Exception problem !
 
Similar Threads
Result of the Code
Tricky NullPointerException Problem
Need explanations of inheritance
array[] [] ?
What can be done to stop flickering of the image??