Exception: JQ::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/jq.rb,
ext/jq/jq_ext.c

Overview

Base exception class for all jq-related errors.

All other jq exception classes inherit from this, allowing you to rescue all jq errors with a single rescue clause:

begin
  JQ.filter(json, filter)
rescue JQ::Error => e
  puts "JQ error: #{e.message}"
end

Direct Known Subclasses

CompileError, ParseError, RuntimeError