Exception: Microsandbox::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/microsandbox/errors.rb,
sig/microsandbox.rbs

Overview

Base class for every error raised by the SDK. Mirrors the Python SDK's flat hierarchy (sdk/python/microsandbox/errors.py): each class carries a stable #code. The native layer raises the matching subclass based on the core MicrosandboxError variant; unmapped variants surface as Error.

Constant Summary collapse

CODE =
"microsandbox-error"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.codeString

The stable, machine-readable error code for this class.

Returns:

  • (String)


12
13
14
# File 'lib/microsandbox/errors.rb', line 12

def self.code
  const_get(:CODE)
end

Instance Method Details

#codeString

The stable, machine-readable error code for this instance.

Returns:

  • (String)


17
18
19
# File 'lib/microsandbox/errors.rb', line 17

def code
  self.class.code
end