Class: Google::Apis::ScriptV1::ExecutionError

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/script_v1/classes.rb,
generated/google/apis/script_v1/representations.rb,
generated/google/apis/script_v1/representations.rb

Overview

An object that provides information about the nature of an error in the Apps Script Execution API. If an run call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains a Status object. The Status object's details field contains an array with a single one of these ExecutionError objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ExecutionError

Returns a new instance of ExecutionError



315
316
317
# File 'generated/google/apis/script_v1/classes.rb', line 315

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#error_messageString

The error message thrown by Apps Script, usually localized into the user's language. Corresponds to the JSON property errorMessage

Returns:

  • (String)


307
308
309
# File 'generated/google/apis/script_v1/classes.rb', line 307

def error_message
  @error_message
end

#error_typeString

The error type, for example TypeError or ReferenceError. If the error type is unavailable, this field is not included. Corresponds to the JSON property errorType

Returns:

  • (String)


301
302
303
# File 'generated/google/apis/script_v1/classes.rb', line 301

def error_type
  @error_type
end

#script_stack_trace_elementsArray<Google::Apis::ScriptV1::ScriptStackTraceElement>

An array of objects that provide a stack trace through the script to show where the execution failed, with the deepest call first. Corresponds to the JSON property scriptStackTraceElements



313
314
315
# File 'generated/google/apis/script_v1/classes.rb', line 313

def script_stack_trace_elements
  @script_stack_trace_elements
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



320
321
322
323
324
# File 'generated/google/apis/script_v1/classes.rb', line 320

def update!(**args)
  @error_type = args[:error_type] if args.key?(:error_type)
  @error_message = args[:error_message] if args.key?(:error_message)
  @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements)
end