Skip to content

Don't hide exception context behind ExceptionType #16

Description

@PascalTurbo

For example when trying to create a document with nil key, an exception will be raised:

connectlocal.rb:7:in `<main>': request not scheduled for  (Libcouchbase::Error::EmptyKey)

When handling errors you would do something like this:

begin
    couchbase.add(nil, 123)
rescue StandardError => e
    puts e
    puts e.backtrace if DEBUG
end

This will lead to the useless information request not scheduled for because the information about the problem is only present in the error class: Libcouchbase::Error::EmptyKey

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions