Ticket #6 (closed enhancement: fixed)

Opened 1 year ago

Last modified 4 months ago

Raise Ruby Exceptions instead of std::runtime_error

Reported by: macournoyer Assigned to: raggi
Priority: major Milestone:
Keywords: Cc:


I don't know if it's possible in C++, but it would help a lot to be able to rescue some of EM internal errors. So instead of crashing w/ std::runtime_error it should raise a Ruby exception.

In C it's a simple:

rb_raise(rb_eRuntimeError, "whatever...");

Change History

03/29/08 08:37:43 changed by raggi

AFAIK eventmachine is designed to also be used outside of ruby, however, there might be scope for moving to a callback based exception handler?

06/26/08 17:09:52 changed by rogerdpack

this would indeed be nice

06/30/08 20:06:52 changed by raggi

  • owner set to raggi.
  • status changed from new to assigned.

I'm gaining some experience and knowledge of the C++ side now, so I think an enhanced wrapper should be possible. I will stab case and see how it comes out.

07/22/08 12:52:22 changed by raggi

  • status changed from assigned to closed.
  • resolution set to fixed.

09/13/08 10:43:43 changed by raggi

  • status changed from closed to reopened.
  • resolution deleted.

Should add a ifdef to use rb_raise instead of std::runtime_error

12/08/08 15:39:19 changed by rogerdpack

this is quite annoying, ex: EM::start_server outside of EM::run results in a "non error output to the screen" segfault style message. Not helpful, indeed.

01/27/09 17:08:57 changed by raggi

  • status changed from reopened to closed.
  • resolution set to fixed.

Not great, but initially in.