class

Vow::Error

Inherits Exception < Reference < Object

Root of every error Vow raises across the dispatch boundary. Carries a stable string code (what a transport forwards to its client) plus an optional hint. The code is a string rather than an enum so downstream transports and services can mint their own (sqlite_not_open, rate_limited, …) without editing Vow. The convenience constructors below cover Vow's built-in categories; Vow::Error.new("my_code", msg) covers the rest.

Constants

BUILTIN_CODES = ["bad_input", "not_found", "unauthorized", "internal"] of ::String

Vow's built-in error codes, in definition order. The single source of truth shared by the convenience constructors below and the codegen, which emits them as the VowErrorCode union so the generated client's catch autocompletes the same codes Vow actually raises. Downstream codes stay representable through the union's open (string & {}) arm — listing the built-ins here doesn't close it.

Constructors

bad_input(message : String, hint : String | Nil = nil) : Error

Caller sent something Vow couldn't accept: malformed JSON, wrong arg count, or an arg that wouldn't decode into its declared type.

Source
internal(message : String, hint : String | Nil = nil) : Error
Source
new(code : String, message : String, hint : String | Nil = nil)
Source
not_found(message : String, hint : String | Nil = nil) : Error

Dispatch was asked for a procedure name that isn't registered.

Source
unauthorized(message : String, hint : String | Nil = nil) : Error
Source

Instance methods

code
Source
hint
Source