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
Exception thrown on errors encountered while using type serializers.
- Since:
- 4.0.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate an exception with unknown message and cause.SerializationException
(AnnotatedType expectedType, String message) Create an exception without a cause.SerializationException
(AnnotatedType expectedType, String message, Throwable cause) Create an exception with message and wrapped cause.SerializationException
(AnnotatedType expectedType, Throwable cause) Create an exception with a cause and no additional information.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, AnnotatedType expectedType, @Nullable String message, @Nullable Throwable cause) Create an exception with message and wrapped cause.SerializationException
(ConfigurationNode node, AnnotatedType expectedType, String message) Create an exception with a message and unknown cause.SerializationException
(ConfigurationNode node, AnnotatedType expectedType, Throwable cause) Create an exception with wrapped cause.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, AnnotatedType expectedType, String message) Create an exception with message and wrapped cause.SerializationException
(NodePath path, Type expectedType, String message) Create an exception with message and wrapped cause. -
Method Summary
Modifier and TypeMethodDescription@Nullable Type
Get the desired type associated with the failed object mapping operation.@Nullable String
Get a description of the location of this error, with path included.final void
initType
(AnnotatedType type) Initialize the expected type.void
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 Details
-
serialVersionUID
- See Also:
-
-
Constructor Details
-
SerializationException
public SerializationException()Create an exception with unknown message and cause.- Since:
- 4.0.0
-
SerializationException
Create an exception without a cause.- Parameters:
message
- message with information about the exception- Since:
- 4.0.0
-
SerializationException
Create an exception with a cause and no additional information.- Parameters:
cause
- wrapped causing throwable- Since:
- 4.0.0
-
SerializationException
Create an exception without a cause.- Parameters:
expectedType
- declared type being processedmessage
- message with information about the exception- Since:
- 4.0.0
-
SerializationException
Create an exception without a cause.- Parameters:
expectedType
- declared type being processedmessage
- message with information about the exception- Since:
- 4.2.0
-
SerializationException
Create an exception with a cause and no additional information.- Parameters:
expectedType
- declared type being processedcause
- wrapped causing throwable- Since:
- 4.0.0
-
SerializationException
Create an exception with a cause and no additional information.- Parameters:
expectedType
- declared type being processedcause
- wrapped causing throwable- Since:
- 4.2.0
-
SerializationException
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
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
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
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
Create an exception with wrapped cause.- Parameters:
node
- node being processedexpectedType
- declared type being processedcause
- cause to be wrapped- Since:
- 4.0.0
-
SerializationException
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, 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(ConfigurationNode node, AnnotatedType 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.2.0
-
SerializationException
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
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 Details
-
expectedType
Get the desired type associated with the failed object mapping operation.- Returns:
- type
- Since:
- 4.0.0
-
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
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
Initialize the expected type.If a type has already been set, it will not be overridden.
- Parameters:
type
- expected type- Since:
- 4.2.0
-