Package uk.blankaspect.common.exception2
Class LocationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
uk.blankaspect.common.exception2.BaseException
uk.blankaspect.common.exception2.LocationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FileException
This class implements an exception that relates to a location.
- See Also:
-
Field Summary
Fields inherited from class uk.blankaspect.common.exception2.BaseException
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionLocationException
(String message, String location, Object... replacements) Creates a new instance of an exception with the specified detail message and location.LocationException
(String message, Throwable cause, String location, Object... replacements) Creates a new instance of an exception with the specified detail message, cause and location.LocationException
(BaseException exception, String location, Object... replacements) Creates a new instance of an exception from the detail message and cause of the specified exception and the specified location. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
createMessage
(String message, String location, Object... replacements) Creates a composite message from the specified components, and returns the result.Methods inherited from class uk.blankaspect.common.exception2.BaseException
createMessage, throwCause, throwCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
LocationException
Creates a new instance of an exception with the specified detail message and location.- Parameters:
message
- the detail message of the exception.location
- the location with which the exception will be associated, which may benull
.replacements
- the items whose string representations will replace placeholders inmessage
.
-
LocationException
Creates a new instance of an exception with the specified detail message, cause and location.- Parameters:
message
- the detail message of the exception.cause
- the cause of the exception, which may benull
.location
- the location with which the exception will be associated, which may benull
.replacements
- the items whose string representations will replace placeholders inmessage
.
-
LocationException
Creates a new instance of an exception from the detail message and cause of the specified exception and the specified location.- Parameters:
exception
- the exception that will provide the detail message and underlying cause.location
- the location with which the exception will be associated, which may benull
.replacements
- the items whose string representations will replace placeholders inmessage
.
-
-
Method Details
-
createMessage
Creates a composite message from the specified components, and returns the result.- Parameters:
message
- the base message.location
- the location that will be prefixed tomessage
, which may benull
.replacements
- the items whose string representations will replace placeholders inmessage
.- Returns:
- the composite message that was created from
message
,location
andreplacements
.
-