Class SerializationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.spongepowered.configurate.ConfigurateException
-
- org.spongepowered.configurate.serialize.SerializationException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CoercionFailedException
public class SerializationException extends ConfigurateException
Exception thrown on errors encountered while using type serializers.- Since:
- 4.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SerializationException()
Create an exception with unknown message and cause.SerializationException(Type expectedType, String message)
Create an exception without a cause.SerializationException(Type expectedType, String message, Throwable cause)
Create an exception with message and wrapped cause.SerializationException(Type expectedType, Throwable cause)
Create an exception with a cause and no additional information.SerializationException(String message)
Create an exception without a cause.SerializationException(Throwable cause)
Create an exception with a cause and no additional information.SerializationException(ConfigurationNode node, Type expectedType, @Nullable String message, @Nullable Throwable cause)
Create an exception with message and wrapped cause.SerializationException(ConfigurationNode node, Type expectedType, String message)
Create an exception with a message and unknown cause.SerializationException(ConfigurationNode node, Type expectedType, Throwable cause)
Create an exception with wrapped cause.SerializationException(NodePath path, Type expectedType, String message)
Create an exception with message and wrapped cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Type
expectedType()
Get the desired type associated with the failed object mapping operation.@Nullable String
getMessage()
Get a description of the location of this error, with path included.void
initType(Type type)
Initialize the expected type.-
Methods inherited from class org.spongepowered.configurate.ConfigurateException
initPath, path, rawMessage, wrap
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SerializationException
public SerializationException()
Create an exception with unknown message and cause.- Since:
- 4.0.0
-
SerializationException
public SerializationException(String message)
Create an exception without a cause.- Parameters:
message
- message with information about the exception- Since:
- 4.0.0
-
SerializationException
public SerializationException(Throwable cause)
Create an exception with a cause and no additional information.- Parameters:
cause
- wrapped causing throwable- Since:
- 4.0.0
-
SerializationException
public SerializationException(Type expectedType, String message)
Create an exception without a cause.- Parameters:
expectedType
- declared type being processedmessage
- message with information about the exception- Since:
- 4.0.0
-
SerializationException
public SerializationException(Type expectedType, Throwable cause)
Create an exception with a cause and no additional information.- Parameters:
expectedType
- declared type being processedcause
- wrapped causing throwable- Since:
- 4.0.0
-
SerializationException
public SerializationException(Type expectedType, String message, Throwable cause)
Create an exception with message and wrapped cause.- Parameters:
expectedType
- declared type being processedmessage
- informational messagecause
- cause to be wrapped- Since:
- 4.0.0
-
SerializationException
public SerializationException(ConfigurationNode node, Type expectedType, String message)
Create an exception with a message and unknown cause.- Parameters:
node
- node being processedmessage
- informational messageexpectedType
- declared type being processed- Since:
- 4.0.0
-
SerializationException
public SerializationException(ConfigurationNode node, Type expectedType, Throwable cause)
Create an exception with wrapped cause.- Parameters:
node
- node being processedexpectedType
- declared type being processedcause
- cause to be wrapped- Since:
- 4.0.0
-
SerializationException
public SerializationException(ConfigurationNode node, Type expectedType, @Nullable String message, @Nullable Throwable cause)
Create an exception with message and wrapped cause.- Parameters:
node
- node being processedexpectedType
- declared type being processedmessage
- informational messagecause
- cause to be wrapped- Since:
- 4.0.0
-
SerializationException
public SerializationException(NodePath path, Type expectedType, String message)
Create an exception with message and wrapped cause.- Parameters:
path
- path to node being processedexpectedType
- declared type being processedmessage
- informational message- Since:
- 4.0.0
-
-
Method Detail
-
expectedType
public @Nullable Type expectedType()
Get the desired type associated with the failed object mapping operation.- Returns:
- type
- Since:
- 4.0.0
-
getMessage
public @Nullable String getMessage()
Description copied from class:ConfigurateException
Get a description of the location of this error, with path included.- Overrides:
getMessage
in classConfigurateException
- Returns:
- message
-
-