Browser#trigger_event: Improved error handling

[Issue #50]