• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User Defined Exception problem !

 
Arun C. Giridharan
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




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
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't get any compilation errors. Check it again. BTW, what is the purpose of extending Exception?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie is right!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic