I have the following situation:
public class MyHandler extends DefaultHandler {
public class CustomException extends SAXException {
}
}
Eclipse is telling me that SAXException is serializable, and that I should either add a serialVersionUID to CustomException or suppress the warnings.
Questions:
Related problem (less important): why does Eclipse always tell me that a serialVersionUID is missing, even when I add one?
1 All exceptions are Serializable because Throwable, the super class for all exceptions, is Serializable. It is used in RMI, if a remote method throws an exception this exception will be returned to client using serialization
2 You can do both, if you are not going to serialize your custom exception, it makes no difference