Fixed 2 bugs in the error handler implementation

- The order of constructor arguments to `ErrorException` was incorrect, severity and code were switched.
- The error handler function did not match the signature defined in the [PHP manual](http://php.net/set_error_handler) - the path, line number, and context must be optional.