Package software.amazon.smithy.model
Class SourceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
software.amazon.smithy.model.SourceException
- All Implemented Interfaces:
Serializable
,FromSourceLocation
- Direct Known Subclasses:
ExpectationNotMetException
,ModelSyntaxException
,NodeDeserializationException
An exception that can be traced back to a
SourceLocation
.- See Also:
-
Constructor Summary
ConstructorDescriptionSourceException
(String message, FromSourceLocation sourceLocation) SourceException
(String message, FromSourceLocation sourceLocation, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the message for this exception without the appended source location.Gets the source location of a value.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SourceException
-
SourceException
-
-
Method Details
-
getSourceLocation
Description copied from interface:FromSourceLocation
Gets the source location of a value.- Specified by:
getSourceLocation
in interfaceFromSourceLocation
- Returns:
- Returns the source location of the value.
-
getMessageWithoutLocation
Retrieves the message for this exception without the appended source location.- Returns:
- The trimmed message.
-