error_event is static.  What if multiple threads hit on an error?  Is this thread-safe?  It doesn't look like it.