Class SpinnakerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.netflix.spinnaker.kork.exceptions.SpinnakerException
- All Implemented Interfaces:
HasAdditionalAttributes,Serializable
- Direct Known Subclasses:
ConstraintViolationException,CredentialsException,IntegrationException,InvalidRequestException,NotFoundException,SystemException,UserException
A root-level marker interface for all exceptions to be thrown by Spinnaker code.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpinnakerException(String message) SpinnakerException(String message, String userMessage) SpinnakerException(String message, Throwable cause) SpinnakerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) SpinnakerException(String message, Throwable cause, String userMessage) SpinnakerException(Throwable cause) SpinnakerException(Throwable cause, String userMessage) -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(String message) Creates a new instance of the exception, but with a new message.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.netflix.spinnaker.kork.exceptions.HasAdditionalAttributes
getAdditionalAttributes
-
Constructor Details
-
SpinnakerException
public SpinnakerException() -
SpinnakerException
-
SpinnakerException
-
SpinnakerException
-
SpinnakerException
-
SpinnakerException
-
SpinnakerException
-
SpinnakerException
-
-
Method Details
-
newInstance
Creates a new instance of the exception, but with a new message.This method in and of itself is not really useful (using something like new SpinnakerException(message, e) would work). However, it becomes useful when all other child classes of SpinnakerException override it.
This allows a caller to use a generic catch statement to update the message, all in one line, i.e
catch (SpinnakerException e) { // if the child class has a newInstance override, the return type will stay // the type of the child class return e.newInstance("new message"); }- Parameters:
message-- Returns:
-