added custom error handler

The main intension of this story is to convert all errors to exception. Thus this error handler should throw an exception whenever an error happens. Use [`\ErrorException`](http://php.net/manual/en/class.errorexception.php) as it's a built-in exception class exactly for this purpose.