Exceptions

Exceptions may be raised during syntax checking, code generation, simulation, or state space analysis. As CPN ML builds on top of Standard ML, we distinguish between exceptions that are declared as part of CPN ML and Standard ML exceptions.

CPN ML exceptions

The following exceptions are declared as part of CPN ML.

InternalError str
Indicates that a serious error occurred during Syntax checking, code generation, simulation, or state space analysis. str is a string containing a more detailed error message.
no_singleton
Indicates an attempt to use the multi-set function ms_to_col to convert either an empty multiset or a multiset with more than one element to a single color.
Subtract
Indicates an illegal attempt to perform multiset subtraction.
Bernoulli
Indicates that an error occurred when using the Bernoulli distribution function.
Binomial
Indicates that an error occurred when using the Binomial distribution function.
Chisq
Indicates that an error occurred when using the Chisq distribution function.
Discrete
Indicates that an error occurred when using the Discrete distribution function.
Erlang
Indicates that an error occurred when using the Erlang distribution function.
Exponential
Indicates that an error occurred when using the Exponential distribution function.
Normal
Indicates that an error occurred when using the Normal distribution function.
Poisson
Indicates that an error occurred when using the Poisson distribution function.
Student
Indicates that an error occurred when using the Student distribution function.
Uniform
Indicates that an error occurred when using the Uniform distribution function.
ExcAvlLookup
Indicates that a node was not found when looking up a particular node when using the state space tool. May be raised when using the State space tools, or when you make state space queries.
NotValidDirExn str
Indicates that an error occurred when initializing or accessing one of the output directories that are managed by Output management. str is a string containing a more detailed error message.
SccGraphNotCalculated
Indicates that the SCC graph should have been calculated before attempting to Saving a standard state space report.

A serious error has occurred if an InternalError exception is not handled by CPN Tools. If you encounter an InternalError exception (or an exception that has a name that starts with CPN'), please submit a bug report. Please include the net that caused the problem, and include a description of the situation that led to the exception.

Standard ML exceptions

The following Standard ML exceptions may also be raised when editing, simulating or analyzing a CP-net:

  • Bind
  • Chr
  • Div
  • Domain
  • Empty
  • Match
  • Option
  • Overflow
  • Size
  • Span
  • Subscript

For details about these exceptions see the General structure in the SML Basis Library.

Additional SML exceptions are described in various other signatures and structures that are documented in the SML Basis Library.