Exception: Kobako::UndefinedEntrypointError
- Inherits:
-
SandboxError
- Object
- StandardError
- Error
- SandboxError
- Kobako::UndefinedEntrypointError
- Defined in:
- lib/kobako/errors.rb,
sig/kobako/errors.rbs
Overview
UndefinedEntrypointError is the SandboxError subclass raised when a
#run target names no top-level constant in the guest. It carries the
#name that was asked for and the #available names it could have
been — the top-level constants the preloaded snippets contributed — so
a caller corrects the name from the error rather than by reading the
guest source. Ruby pairs NameError#name with
NameError#local_variables for the same reason.
Instance Attribute Summary collapse
-
#available ⇒ Array[Symbol]
readonly
Returns the value of attribute available.
-
#name ⇒ Symbol?
readonly
Returns the value of attribute name.
Attributes included from CarriesExecution
Attributes included from Diagnosable
#backtrace_lines, #klass, #origin
Instance Method Summary collapse
-
#initialize(message, name: nil, available: []) ⇒ UndefinedEntrypointError
constructor
A new instance of UndefinedEntrypointError.
Methods included from CarriesExecution
Constructor Details
#initialize(message, name: nil, available: []) ⇒ UndefinedEntrypointError
Returns a new instance of UndefinedEntrypointError.
152 153 154 155 156 |
# File 'lib/kobako/errors.rb', line 152 def initialize(, name: nil, available: [], **) super(, **) @name = name @available = available end |
Instance Attribute Details
#available ⇒ Array[Symbol] (readonly)
Returns the value of attribute available.
150 151 152 |
# File 'lib/kobako/errors.rb', line 150 def available @available end |
#name ⇒ Symbol? (readonly)
Returns the value of attribute name.
150 151 152 |
# File 'lib/kobako/errors.rb', line 150 def name @name end |