Class | Sequel::NoMatchingRow |
In: |
lib/sequel/exceptions.rb
|
Parent: | Error |
Error raised when the user requests a record via the first! or similar method, and the dataset does not yield any rows.
dataset | [RW] | The dataset that raised this NoMatchingRow exception. |
If the first argument is a Sequel::Dataset, set the dataset related to the exception to that argument, instead of assuming it is the exception message.
# File lib/sequel/exceptions.rb, line 63 63: def initialize(msg=nil) 64: if msg.is_a?(Sequel::Dataset) 65: @dataset = msg 66: msg = nil 67: end 68: super 69: end