The error event is emitted, when a error occured in the library.
The callback take the error argument.
If there is no listener for it, then the default action is to print a stack trace and exit the program.