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:
java.io.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(java.lang.reflect.AnnotatedType expectedType, java.lang.String message)
Create an exception without a cause.SerializationException(java.lang.reflect.AnnotatedType expectedType, java.lang.String message, java.lang.Throwable cause)
Create an exception with message and wrapped cause.SerializationException(java.lang.reflect.AnnotatedType expectedType, java.lang.Throwable cause)
Create an exception with a cause and no additional information.SerializationException(java.lang.reflect.Type expectedType, java.lang.String message)
Create an exception without a cause.SerializationException(java.lang.reflect.Type expectedType, java.lang.String message, java.lang.Throwable cause)
Create an exception with message and wrapped cause.SerializationException(java.lang.reflect.Type expectedType, java.lang.Throwable cause)
Create an exception with a cause and no additional information.SerializationException(java.lang.String message)
Create an exception without a cause.SerializationException(java.lang.Throwable cause)
Create an exception with a cause and no additional information.SerializationException(ConfigurationNode node, java.lang.reflect.AnnotatedType expectedType, @Nullable java.lang.String message, @Nullable java.lang.Throwable cause)
Create an exception with message and wrapped cause.SerializationException(ConfigurationNode node, java.lang.reflect.AnnotatedType expectedType, java.lang.String message)
Create an exception with a message and unknown cause.SerializationException(ConfigurationNode node, java.lang.reflect.AnnotatedType expectedType, java.lang.Throwable cause)
Create an exception with wrapped cause.SerializationException(ConfigurationNode node, java.lang.reflect.Type expectedType, @Nullable java.lang.String message, @Nullable java.lang.Throwable cause)
Create an exception with message and wrapped cause.SerializationException(ConfigurationNode node, java.lang.reflect.Type expectedType, java.lang.String message)
Create an exception with a message and unknown cause.SerializationException(ConfigurationNode node, java.lang.reflect.Type expectedType, java.lang.Throwable cause)
Create an exception with wrapped cause.SerializationException(NodePath path, java.lang.reflect.AnnotatedType expectedType, java.lang.String message)
Create an exception with message and wrapped cause.SerializationException(NodePath path, java.lang.reflect.Type expectedType, java.lang.String message)
Create an exception with message and wrapped cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.reflect.Type
expectedType()
Get the desired type associated with the failed object mapping operation.@Nullable java.lang.String
getMessage()
Get a description of the location of this error, with path included.void
initType(java.lang.reflect.AnnotatedType type)
Initialize the expected type.void
initType(java.lang.reflect.Type type)
Initialize the expected type.-
Methods inherited from class org.spongepowered.configurate.ConfigurateException
initPath, path, rawMessage, wrap
-
-
-
-
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(java.lang.String message)
Create an exception without a cause.- Parameters:
message
- message with information about the exception- Since:
- 4.0.0
-
SerializationException
public SerializationException(java.lang.Throwable cause)
Create an exception with a cause and no additional information.- Parameters:
cause
- wrapped causing throwable- Since:
- 4.0.0
-
SerializationException
public SerializationException(java.lang.reflect.Type expectedType, java.lang.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(java.lang.reflect.AnnotatedType expectedType, java.lang.String message)
Create an exception without a cause.- Parameters:
expectedType
- declared type being processedmessage
- message with information about the exception- Since:
- 4.2.0
-
SerializationException
public SerializationException(java.lang.reflect.Type expectedType, java.lang.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(java.lang.reflect.AnnotatedType expectedType, java.lang.Throwable cause)
Create an exception with a cause and no additional information.- Parameters:
expectedType
- declared type being processedcause
- wrapped causing throwable- Since:
- 4.2.0
-
SerializationException
public SerializationException(java.lang.reflect.Type expectedType, java.lang.String message, java.lang.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(java.lang.reflect.AnnotatedType expectedType, java.lang.String message, java.lang.Throwable cause)
Create an exception with message and wrapped cause.- Parameters:
expectedType
- declared type being processedmessage
- informational messagecause
- cause to be wrapped- Since:
- 4.2.0
-
SerializationException
public SerializationException(ConfigurationNode node, java.lang.reflect.Type expectedType, java.lang.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, java.lang.reflect.AnnotatedType expectedType, java.lang.String message)
Create an exception with a message and unknown cause.- Parameters:
node
- node being processedmessage
- informational messageexpectedType
- declared type being processed- Since:
- 4.2.0
-
SerializationException
public SerializationException(ConfigurationNode node, java.lang.reflect.Type expectedType, java.lang.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, java.lang.reflect.AnnotatedType expectedType, java.lang.Throwable cause)
Create an exception with wrapped cause.- Parameters:
node
- node being processedexpectedType
- declared type being processedcause
- cause to be wrapped- Since:
- 4.2.0
-
SerializationException
public SerializationException(ConfigurationNode node, java.lang.reflect.Type expectedType, @Nullable java.lang.String message, @Nullable java.lang.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(ConfigurationNode node, java.lang.reflect.AnnotatedType expectedType, @Nullable java.lang.String message, @Nullable java.lang.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.2.0
-
SerializationException
public SerializationException(NodePath path, java.lang.reflect.Type expectedType, java.lang.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
-
SerializationException
public SerializationException(NodePath path, java.lang.reflect.AnnotatedType expectedType, java.lang.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.2.0
-
-
Method Detail
-
expectedType
public @Nullable java.lang.reflect.Type expectedType()
Get the desired type associated with the failed object mapping operation.- Returns:
- type
- Since:
- 4.0.0
-
getMessage
public @Nullable java.lang.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
-
initType
public void initType(java.lang.reflect.Type type)
Initialize the expected type.If a type has already been set, it will not be overridden.
- Parameters:
type
- expected type- Since:
- 4.0.0
-
initType
public final void initType(java.lang.reflect.AnnotatedType type)
Initialize the expected type.If a type has already been set, it will not be overridden.
- Parameters:
type
- expected type- Since:
- 4.2.0
-
-