Sha256: 73b811f9ae1f53ea2307df0698df6d41808a3abb1942cb07169032a7d5d63c9f

Contents?: true

Size: 464 Bytes

Versions: 18

Compression:

Stored size: 464 Bytes

Contents

# -*- encoding : utf-8 -*-
module Dao
  class Dao::Error < ::StandardError; end

  class Dao::Error::Result < Error
    attr_accessor :result

    def self.for(result, *args, &block)
      error = new(*args, &block)
      error.result = result
      error
    end
  end

  class Dao::Error::Status < Error
    attr_accessor :status

    def self.for(status, *args, &block)
      error = new(*args, &block)
      error.status = status
      error
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dao-8.0.1 lib/dao/exceptions.rb
dao-8.0.0 lib/dao/exceptions.rb
dao-7.0.0 lib/dao/exceptions.rb
dao-5.6.1 lib/dao/exceptions.rb
dao-5.5.2 lib/dao/exceptions.rb
dao-5.5.1 lib/dao/exceptions.rb
dao-5.5.0 lib/dao/exceptions.rb
dao-5.4.0 lib/dao/exceptions.rb
dao-5.3.3 lib/dao/exceptions.rb
dao-5.3.2 lib/dao/exceptions.rb
dao-5.3.0 lib/dao/exceptions.rb
dao-5.2.1 lib/dao/exceptions.rb
dao-5.1.2 lib/dao/exceptions.rb
dao-5.1.1 lib/dao/exceptions.rb
dao-5.0.0 lib/dao/exceptions.rb
dao-4.6.4 lib/dao/exceptions.rb
dao-4.4.4 lib/dao/exceptions.rb
dao-4.4.2 lib/dao/exceptions.rb