Exception: CrossPlane::NgxParserBaseException
- Inherits:
-
StandardError
- Object
- StandardError
- CrossPlane::NgxParserBaseException
- Defined in:
- lib/crossplane/errors.rb
Direct Known Subclasses
NgxParserDirectiveArgumentsError, NgxParserDirectiveContextError, NgxParserDirectiveUnknownError, NgxParserIncludeError, NgxParserSyntaxError
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#strerror ⇒ Object
readonly
Returns the value of attribute strerror.
Instance Method Summary collapse
-
#initialize(filename, lineno, strerror) ⇒ NgxParserBaseException
constructor
A new instance of NgxParserBaseException.
Constructor Details
#initialize(filename, lineno, strerror) ⇒ NgxParserBaseException
Returns a new instance of NgxParserBaseException.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/crossplane/errors.rb', line 12 def initialize(filename, lineno, strerror) @filename = filename @lineno = lineno @strerror = strerror if @lineno.nil? @error = format('%s in %s', @strerror, @filename) else @error = format('%s in %s:%s', @strerror, @filename, @lineno) end super(@error) end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
11 12 13 |
# File 'lib/crossplane/errors.rb', line 11 def filename @filename end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
11 12 13 |
# File 'lib/crossplane/errors.rb', line 11 def lineno @lineno end |
#strerror ⇒ Object (readonly)
Returns the value of attribute strerror.
11 12 13 |
# File 'lib/crossplane/errors.rb', line 11 def strerror @strerror end |