java.io
public class InvalidClassException extends ObjectStreamException
The field classname
will contain the name of the
class that caused the problem if known. The getMessage() method
for this exception will always include the name of that class
if known.
Modifier and Type | Field and Description |
---|---|
String |
classname
The name of the class which encountered the error.
|
Constructor and Description |
---|
InvalidClassException(String message)
Create an exception with a descriptive error message, but a null
classname.
|
InvalidClassException(String classname,
String message)
Create an exception with a descriptive error message, and the name of
the class that caused the problem.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the descriptive error message for this exception.
|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InvalidClassException(String message)
message
- the descriptive error messagepublic InvalidClassException(String classname, String message)
classname
- the name of the faulty classmessage
- the descriptive error messagepublic String getMessage()
[classname][; ][super.getMessage()]
.getMessage
in class Throwable