class Sequel::NoMatchingRow

Error raised when the user requests a record via the first! or similar method, and the dataset does not yield any rows.

Attributes

dataset[RW]

The dataset that raised this NoMatchingRow exception.

Public Class Methods

new(msg=nil) click to toggle source

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.

Calls superclass method
    # File lib/sequel/exceptions.rb
102 def initialize(msg=nil)
103   if msg.is_a?(Sequel::Dataset)
104     @dataset = msg
105     msg = nil
106   end
107   super
108 end