Exception: Toys::ContextualError

Inherits:
StandardError
  • Object
show all
Defined in:
core-docs/toys/errors.rb

Overview

Defined in the toys-core gem

A wrapper exception used to provide user-oriented context for an error thrown during tool execution.

Instance Attribute Summary collapse

Instance Attribute Details

An overall banner message

Returns:

  • (String)


64
65
66
# File 'core-docs/toys/errors.rb', line 64

def banner
  @banner
end

#cause::StandardError (readonly)

The underlying exception

Returns:

  • (::StandardError)


58
59
60
# File 'core-docs/toys/errors.rb', line 58

def cause
  @cause
end

#config_lineInteger (readonly)

The line number in the toys config file in which the error was detected

Returns:

  • (Integer)


76
77
78
# File 'core-docs/toys/errors.rb', line 76

def config_line
  @config_line
end

#config_pathString (readonly)

The path to the toys config file in which the error was detected

Returns:

  • (String)


70
71
72
# File 'core-docs/toys/errors.rb', line 70

def config_path
  @config_path
end

#tool_argsArray<String> (readonly)

The arguments passed to the tool that was running when the error occurred

Returns:

  • (Array<String>)


88
89
90
# File 'core-docs/toys/errors.rb', line 88

def tool_args
  @tool_args
end

#tool_nameArray<String> (readonly)

The full name of the tool that was running when the error occurred

Returns:

  • (Array<String>)


82
83
84
# File 'core-docs/toys/errors.rb', line 82

def tool_name
  @tool_name
end