GitXplorerGitXplorer
J

active_error

public
24 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
40fd9e3e6cc635850fa596729ffc99a3fd48345d

Release v1.0.1

JJuanitoFatas committed 9 years ago
Unverified
09561090cd94fd82a84fcd8d0f69f7fd8a134fc1

Add CHANGELOG.md [ci skip]

JJuanitoFatas committed 9 years ago
Unverified
6fd39d368357473ba0b231eefa74ba716519a375

Fix homepage in gemspec [ci skip]

JJuanitoFatas committed 9 years ago
Unverified
e50aad97a9b5f7e9f418e0964fe3c582c5bc00f4

Merge pull request #1 from JuanitoFatas/feature/default_standard_error

JJuanitoFatas committed 9 years ago
Unverified
c7cde396b4eb30b7e7a31d094804eda92c051ad4

Style tweaks and one more spec

JJuanitoFatas committed 9 years ago
Unverified
6f2eeca2bcd81e7f06739309be6c23deb0bb2dea

Use double quotes for String

JJuanitoFatas committed 9 years ago

README

The README file for this repository.

ActiveError

Gem Version Build Status

Easily create an exception with backtrace.

Usage

ActiveError.new(StandardError, "error message")
ActiveError.new(StandardError, "error message", backtrace: caller)

# default error class is StandardError
ActiveError.new("error message")
ActiveError.new("error message", backtrace: caller)

Why

Fix this common pattern:

exception = StandardError.new("error message")
exception.set_backtrace(caller)

Should be in one-step:

ActiveError.new(StandardError, "error message", backtrace: caller)

Enjoy 🎉

Installation

Add this line to your application's Gemfile:

gem "active_error"

And then execute:

$ bundle

Or install it yourself as:

$ gem install active_error

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/JuanitoFatas/active_error.

License

The gem is available as open source under the terms of the Apache License 2.0.