enebo / Purugin

Ruby Minecraft Plugin support on top of bukkit
238 stars 32 forks source link

event(:some_event) when symbol is not a valid event should be kinder #19

Closed enebo closed 12 years ago

enebo commented 12 years ago

In general, most of these symbol -> real_obj methods in Purugin basically end up bombing with a NoMethodError on nil. Do a pass and return nicer Error when the event, etc.. do no match.

enebo commented 12 years ago

It now raises an ArgumentError when it bombs out and includes the invalid name of the event.