Exception: CrossPlane::NgxParserBaseException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filenameObject (readonly)

Returns the value of attribute filename.



11
12
13
# File 'lib/crossplane/errors.rb', line 11

def filename
  @filename
end

#linenoObject (readonly)

Returns the value of attribute lineno.



11
12
13
# File 'lib/crossplane/errors.rb', line 11

def lineno
  @lineno
end

#strerrorObject (readonly)

Returns the value of attribute strerror.



11
12
13
# File 'lib/crossplane/errors.rb', line 11

def strerror
  @strerror
end