Implemented error handling

- Created ErrorException class
- Set error handler to throw PHPException
- Set exception handler to display error message for uncaught exceptions
Updated sub modules