There are two simple cleanups in this pull request. The first is to remove BUILD_FOR_RUBY since we only support running with ruby this seems extraneous.
The second is to convert all of the thrown c++ exceptions into raised ruby exceptions. With this, things like EM.set_effective_user failing can be caught if the user is not allowed to change.
raise ruby exception instead of throwing c++ exception
This looks great and was a long time coming, but I think it would be a nice addition an EM namespaced exception were raised instead of RuntimeError so that a user could catch and handle EM-specifc exceptions.
So, something along the lines of EM::Exception?
Ideally EM::Exception would be the parent of more specific exception classes, but using just one EM specific exception would be a good start.
Raise EM::Error instead of RuntimeError
I second what @phiggins suggests: make EM::Error a superclass with subclasses for specific issues.
I've added EM::Error, we can always go back later and set exceptions to be more specific as I don't know what the more specific errors should be.
So, any progress on this?