Problems catching error events

throwing exception instead of emitting error. Added error event.

Signed-off-by: DominicBoettger <Dominic.Boettger@inspirationlabs.com>