mirror of
https://github.com/davidalves04/Trabalho-Pratico-SD.git
synced 2025-12-08 12:33:31 +00:00
42 lines
1.2 KiB
Java
42 lines
1.2 KiB
Java
package sd.serialization;
|
|
|
|
/**
|
|
* Exception thrown when serialization or deserialization operations fail.
|
|
*
|
|
* This exception wraps underlying errors (I/O exceptions, parsing errors, etc.)
|
|
* and provides context about what went wrong during the serialization process.
|
|
*/
|
|
public class SerializationException extends Exception {
|
|
|
|
private static final long serialVersionUID = 1L; // Long(64bits) instead of int(32bits)
|
|
|
|
/**
|
|
* Constructs a new serialization exception with the specified detail message.
|
|
*
|
|
* @param message The detail message
|
|
*/
|
|
public SerializationException(String message) {
|
|
super(message);
|
|
}
|
|
|
|
/**
|
|
* Constructs a new serialization exception with the specified detail message
|
|
* and cause.
|
|
*
|
|
* @param message The detail message
|
|
* @param cause The cause of this exception
|
|
*/
|
|
public SerializationException(String message, Throwable cause) {
|
|
super(message, cause);
|
|
}
|
|
|
|
/**
|
|
* Constructs a new serialization exception with the specified cause.
|
|
*
|
|
* @param cause The cause of this exception
|
|
*/
|
|
public SerializationException(Throwable cause) {
|
|
super(cause);
|
|
}
|
|
}
|