Fix fatal error on default errors without exceptions

There is fatal error when logging some default errors which are not exceptions. For example:
```php
case Application::ERROR_CONTROLLER_NOT_FOUND:
case Application::ERROR_CONTROLLER_INVALID:
case Application::ERROR_ROUTER_NO_MATCH:
```