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

public class SpinnakerException extends RuntimeException implements HasAdditionalAttributes
A root-level marker interface for all exceptions to be thrown by Spinnaker code.
See Also:
  • Constructor Details

    • SpinnakerException

      public SpinnakerException()
    • SpinnakerException

      public SpinnakerException(String message)
    • SpinnakerException

      public SpinnakerException(String message, Throwable cause)
    • SpinnakerException

      public SpinnakerException(Throwable cause)
    • SpinnakerException

      public SpinnakerException(String message, String userMessage)
    • SpinnakerException

      public SpinnakerException(String message, Throwable cause, String userMessage)
    • SpinnakerException

      public SpinnakerException(Throwable cause, String userMessage)
    • SpinnakerException

      public SpinnakerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
  • Method Details

    • newInstance

      public SpinnakerException newInstance(String message)
      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: