Sha256: a86c450be243cdb41ead518b3665a4391b70e5e9ff29b76bcfc5b5e6d8e0ba82

Contents?: true

Size: 534 Bytes

Versions: 14

Compression:

Stored size: 534 Bytes

Contents

# Represents an error raised in Sequel code.
class SequelError < StandardError
end

# SequelRollbackError is a special error used to rollback a transactions.
# A transaction block will catch this error and wont pass further up the stack.
class SequelRollbackError < StandardError
end

# Object extensions
class Object
  # Cancels the current transaction without an error:
  #
  #   DB.tranaction do
  #     ...
  #     rollback! if failed_to_contact_client
  #     ...
  #   end
  def rollback!
    raise SequelRollbackError
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sequel-0.3.3 lib/sequel/error.rb
sequel-0.3.2 lib/sequel/error.rb
sequel-0.4.1.1 lib/sequel/error.rb
sequel-0.4.0 lib/sequel-core/error.rb
sequel-0.3.4.1 lib/sequel/error.rb
sequel-0.4.1 lib/sequel/error.rb
sequel-0.4.1.2 lib/sequel/error.rb
sequel-0.4.2.1 lib/sequel/error.rb
sequel-0.4.1.3 lib/sequel/error.rb
sequel-0.4.2.2 lib/sequel/error.rb
sequel-0.4.2 lib/sequel/error.rb
sequel-0.4.3 lib/sequel/error.rb
sequel-0.4.4 lib/sequel/error.rb
sequel-0.4.4.1 lib/sequel/error.rb