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.

Methods

new  

Attributes

dataset  [RW]  The dataset that raised this NoMatchingRow exception.

Public Class methods

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.

[Source]

     # File lib/sequel/exceptions.rb, line 95
 95:     def initialize(msg=nil)
 96:       if msg.is_a?(Sequel::Dataset)
 97:         @dataset = msg
 98:         msg = nil
 99:       end
100:       super
101:     end

[Validate]