Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

ErrorTools

Guides

  • ErrorTools

Tech Notes

  • Error Handling with ErrorTools

Symbols

  • Raise
ErrorTools
The new error handling functionality in this paclet is centered around quality of life improvements to
Failure
[…]
and the addition of new functions that construct, throw, and catch
Failure
[…]
objects.
Failure Error Tags
CreateErrorType
— register a new error tag usable with
CreateFailure
,
Raise
, and
Handle
CreateFailure
— construct a new
Failure
[…]
with the specified error tag and formatted message
Raising and Handling Failure Exceptions
Raise
and
Handle
are analogous to
Throw
and
Catch
, but they assume that the thrown "payload" is always a
Failure
[…]
object.
Handle
supports conditional catching of throw
Failure
's by pattern matching.
Raise
— construct and throw a
Failure
[…]
with the specified error tag and formatted message
Handle
— catch raised
Failure
[…]
's that match the specified error tag
FailurePattern
— pattern that matches any
Failure
containing the specified tag
Logic Error Checking Utilities
Utilities for failing fast and informatively when a program state was reached that the programmer didn't intend or anticipate. These utilities should not be used to raise errors that are expected by the programmer.
RaiseAssert
— raise a
Failure
[
AssertFailedError
,…]
if the specified condition is not true, with an optional custom error message
ConfirmReplace
— apply a rule or list of rules in an attempt to transform the specified expr, raising a
Failure
[
ConfirmReplaceError
,…]
if no rule matches
SetFallthroughError
— set a "fallthrough" down value on the specified symbol that raises a
Failure
[
DownValueFallthroughError
,…]
if no other down values match
Error Propagation & Composition
RaiseConfirm
— if the argument expression is a Failure, raise it, otherwise return it
WrapFailure
— wraps an existing
Failure
in a new
Failure
with the specified error tag and formatted message, and with a
"CausedBy"origFailure
field
WrapRaised
— wrap an uncaught raised
Failure
in a new
Failure
with the specified error tag and formatted message, and with a
"CausedBy"origFailure
field
Built-In Error Types
AssertFailedError
— error tag raised by
RaiseAssert
DownValueFallthroughError
— error tag raised by
SetFallthroughError
functions on fallthrough
ConfirmReplaceError
— error tag raised by
ConfirmReplace
TechNotes
▪
Error Handling With Error Tools
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com