How to use the API to just log an error?

Marius Seritan's Avatar

Marius Seritan

07 Sep, 2010 09:14 PM

I would like to use Exceptional to just log an error, without having an exception. I can do something like the following but it seems pretty convoluted.

begin
Exception.rescue do raise "Hello world" end rescue =>ex
end

Thanks for any pointers :)

Marius

  1. 1 Posted by Ciaran Lee on 07 Sep, 2010 09:34 PM

    Ciaran Lee's Avatar

    Hi Marius,

    You can manually send an exception with
    Exceptional.handle (e, 'some error message')

    It's also possible to add extra information using Exceptional.context, as shown here:
    http://docs.getexceptional.com/getting-started/context/

    Hope this helps!

    Ciaran

  2. Ciaran Lee closed this discussion on 07 Sep, 2010 09:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac