Code ClimateTest CoverageBuild Status

Error messages for Humans.

Join the chat at https://gitter.im/bgreg/humanist-errors

Humanist errors is a system for extending ruby exception messages. It will prepend the standard output with text defined in the humanist errors dictionary.

Installation

Add this line to your application's Gemfile:

gem 'humanist-errors'

And then execute:

$ bundle

Or install it yourself as:

$ gem install humanist-errors

Usage

Require the library and monkey file

require humanist_errors
require humanist_errors/monkey

If you want to only want to see new errors in an isolated area

include HumanistErrors

Then your code in a human block:

with_human_errors do
  #....
end

This gem is intended for use in development and test environments only.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/humanist-errors/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

TODO

1) add more errors to error_map

High level exception tree:
Exception
  NoMethodError
  ScriptError
    LoadError
    NotImplementedError
    SyntaxError
  SignalException
    Interrupt
  StandardError
    ArgumentError
    IOError
      EOFError
    IndexError
    LocalJumpError
    NameError
      NoMethodError
    RangeError
      FloatDomainError
    RuntimeError
    SecurityError
    SystemCallError
    SystemStackError
    ThreadError
    ZeroDivisionError
  SystemExit
  fatal