ErrorHandler displays these errors using appropriate views based on the
nature of the errors and the mode the application runs at.
ErrorHandler is configured as an application component in Application by default.
You can access that instance via Yii::$app->errorHandler.
For more details and usage information on ErrorHandler, see the guide article on handling errors.