Exception: Toys::ContextualError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/toys/errors.rb

Overview

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)


66
67
68
# File 'lib/toys/errors.rb', line 66

def banner
  @banner
end

#config_lineInteger (readonly)

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

Returns:

  • (Integer)


78
79
80
# File 'lib/toys/errors.rb', line 78

def config_line
  @config_line
end

#config_pathString (readonly)

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

Returns:

  • (String)


72
73
74
# File 'lib/toys/errors.rb', line 72

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>)


90
91
92
# File 'lib/toys/errors.rb', line 90

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>)


84
85
86
# File 'lib/toys/errors.rb', line 84

def tool_name
  @tool_name
end