Exception: E2B::TemplateError

Inherits:
E2BError
  • Object
show all
Defined in:
lib/e2b/errors.rb

Overview

Error raised for template-related failures

Instance Attribute Summary collapse

Attributes inherited from E2BError

#headers, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status_code: nil, headers: {}, source_location: nil) ⇒ TemplateError

Returns a new instance of TemplateError.



55
56
57
58
59
# File 'lib/e2b/errors.rb', line 55

def initialize(message = nil, status_code: nil, headers: {}, source_location: nil)
  @source_location = source_location
  super(message, status_code: status_code, headers: headers)
  set_backtrace([source_location]) if source_location
end

Instance Attribute Details

#source_locationObject (readonly)

Returns the value of attribute source_location.



53
54
55
# File 'lib/e2b/errors.rb', line 53

def source_location
  @source_location
end