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 throw. In general, RiskscapeExceptions should be used to indicate a programming problem rather than user-facing errors (e.g. bad parameter value). When a user problem needs to be propagated back to the user in the form of an Exception, a Problem object can optionally be associated with the RiskscapeException - when the exception is caught, the details of the Problem are then conveyed to the user.

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