Class: Daytona::ExecutionError

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/code_interpreter.rb

Overview

Represents an error that occurred during code execution

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:, traceback: '') ⇒ ExecutionError

Returns a new instance of ExecutionError.

Parameters:

  • name (String)
  • value (String)
  • traceback (String) (defaults to: '')


29
30
31
32
33
# File 'lib/daytona/common/code_interpreter.rb', line 29

def initialize(name:, value:, traceback: '')
  @name = name
  @value = value
  @traceback = traceback
end

Instance Attribute Details

#nameString (readonly)

Returns The error type/class name (e.g., “ValueError”, “SyntaxError”).

Returns:

  • (String)

    The error type/class name (e.g., “ValueError”, “SyntaxError”)



18
19
20
# File 'lib/daytona/common/code_interpreter.rb', line 18

def name
  @name
end

#tracebackString (readonly)

Returns Full traceback of the error.

Returns:

  • (String)

    Full traceback of the error



24
25
26
# File 'lib/daytona/common/code_interpreter.rb', line 24

def traceback
  @traceback
end

#valueString (readonly)

Returns The error value.

Returns:

  • (String)

    The error value



21
22
23
# File 'lib/daytona/common/code_interpreter.rb', line 21

def value
  @value
end