Error Handling

This chapter will be expanded as the error-handling model is finalized.

Rux favors explicit error handling over exceptions: a function that can fail reports the failure in its return type, and the caller must deal with it. Unrecoverable conditions instead abort the program with a fatal error.

TopicDescription
The Result TypeReturn-type encoding of recoverable errors
Fatal ErrorsAborting on unrecoverable conditions

See Also

  • match — handling the variants of a Result
  • Enumerations — the tagged-value mechanism behind Result