Exception: Benoit::CompilerError
- Inherits:
-
StandardError
- Object
- Exception
- StandardError
- Benoit::CompilerError
- Defined in:
- lib/benoit/compiler_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#line ⇒ Object
Returns the value of attribute line.
-
#message ⇒ Object
Returns the value of attribute message.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(line, file_path, original_error) ⇒ CompilerError
constructor
A new instance of CompilerError.
- #to_json ⇒ Object
Methods inherited from StandardError
Constructor Details
#initialize(line, file_path, original_error) ⇒ CompilerError
Returns a new instance of CompilerError.
26 27 28 29 30 31 32 |
# File 'lib/benoit/compiler_error.rb', line 26 def initialize(line, file_path, original_error) @line = line @file_path = file_path @output = output @env = env @original_error = original_error end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
24 25 26 |
# File 'lib/benoit/compiler_error.rb', line 24 def env @env end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
24 25 26 |
# File 'lib/benoit/compiler_error.rb', line 24 def file_path @file_path end |
#line ⇒ Object
Returns the value of attribute line.
23 24 25 |
# File 'lib/benoit/compiler_error.rb', line 23 def line @line end |
#message ⇒ Object
Returns the value of attribute message.
23 24 25 |
# File 'lib/benoit/compiler_error.rb', line 23 def @message end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
24 25 26 |
# File 'lib/benoit/compiler_error.rb', line 24 def original_error @original_error end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
24 25 26 |
# File 'lib/benoit/compiler_error.rb', line 24 def output @output end |
Instance Method Details
#to_json ⇒ Object
38 39 40 |
# File 'lib/benoit/compiler_error.rb', line 38 def to_json { line_no: @line, message: @message, path: @file_path, original_error: @original_error, type: "error" }.to_json end |