Added support for custom error class just like in Ruby.
Added support for return values (even though this forces people to return nil, which is a bit of a shame in regards to code-friendlyness).