Exception: Rjq::HaltError

Inherits:
Error
  • Object
show all
Defined in:
lib/rjq/errors.rb

Overview

Halting terminates the whole jq program. It is deliberately not a RuntimeError: try/catch and the optional operator only catch ordinary filter failures.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = nil, status = 0) ⇒ HaltError

Returns a new instance of HaltError.



57
58
59
60
61
# File 'lib/rjq/errors.rb', line 57

def initialize(value = nil, status = 0)
  @value = value
  @status = status
  super(value.nil? ? 'halt_error' : value.to_s)
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



55
56
57
# File 'lib/rjq/errors.rb', line 55

def status
  @status
end

#valueObject (readonly)

Returns the value of attribute value.



55
56
57
# File 'lib/rjq/errors.rb', line 55

def value
  @value
end