Class RiskscapeException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AutoClosingException, CoercionException, CreateException, DuplicateKeysException, ExitException, GeometryInvalidException, GeometryReprojectionException, IdentifiedException, InvalidBoundParametersException, InvalidTupleException, LexerException, MissingTypeException, NoBindingAvailableException, ParameterBindingException, ParseException, PipelineCycleException, PipelineDefinitionException, ResourceLoadingException, ResultComputationException, RiskscapeIOException, TypeBuildingException, UnexpectedNullValueException, UnknownFunctionException, UnknownSRIDException

public class RiskscapeException extends RuntimeException

Root exception that all exceptions from Riskscape engine code should extend. Can optionally accept a Problem, indicating that there's something the user should know about this exception and maybe it's something they can fix - when the exception is caught, the details of the Problem are then conveyed to the user.

If the exception has no problem, it's likely to be an unhandled exception that will need a bug fix - consider in this case whether you really should use RiskscapeException, or an existing java library exception.

See Also:
  • Constructor Details

    • RiskscapeException

      @Deprecated public RiskscapeException(String message)
      Deprecated.
      Use RiskscapeException(Problem) instead to produce an internationalizable error message that works with riskscape's problem API

      XXX do we want to split up the hierarchy somewhat in to : a) unexpected errors that are probably not recoverable/fixable and b) exceptions that are "semantic vessels for a problem" such as a NoSuchObjectExistsException - these things help us with flow control / where they serve as sort of case classes where a standard ResultOrProblems isn't sufficient, e.g. we need to do something different depending on the type of Problem. More thinking required...

    • RiskscapeException

      @Deprecated public RiskscapeException(String message, Throwable cause)
      Deprecated.
      Use RiskscapeException(Problem, Throwable) instead to produce an internationalizable error message that works with riskscape's problem API
    • RiskscapeException

      public RiskscapeException(Problem problem)
    • RiskscapeException

      public RiskscapeException(Problem problem, Throwable cause)
  • Method Details

    • hasProblem

      public boolean hasProblem()
      Returns:
      True if there is a problem associated with this exception
    • getProblem

      public Problem getProblem()
      Returns:
      the problem associated with this exception, or null if there is none
    • getCause

      public Throwable getCause()
      Overrides:
      getCause in class Throwable