Part 1 - exception CLI
IMPORTANT: Apply the D568 is applied before testing.
- in the IDE:
- open the core/units/admin/admin_events_handler.php file for editing
- replace the \AdminEventsHandler::OnDeploy method body with the throw new LogicException('Testing.'); code
- save changes
- in CLI:
- execute the ./in-portal event:run adm:OnDeploy -v command
- confirm that:
- an exception class/message/backtrace is displayed
- an exception message and backtrace are separated by a *single* empty line
- there is a *single* empty line before/after displayed data (exception class+message+backtrace block in a whole)
- the 1st frame in a backtrace points to the line with a throw ... statement in it
- login to the Admin Console
- go to the Logs & Reports → System Log section
- confirm that the above-thrown exception was properly logged (the 1st backtrace frame doesn't point to the line with the throw ... statement in it)
Part 2 - fatal error CLI
- in the IDE:
- open the core/units/admin/admin_events_handler.php file for editing
- replace the \AdminEventsHandler::OnDeploy method body with the trigger_error('Testing', E_USER_ERROR); code
- save changes
- in CLI:
- execute the ./in-portal event:run adm:OnDeploy -v command
- confirm that:
- a fatal error message/backtrace is displayed
- a fatal error message and backtrace are separated by a *single* empty line
- there is a *single* empty line before/after displayed data (fatal error message+backtrace block in a whole)
- the 1st frame in a backtrace points to the line with a trigger_error( ... statement in it
- login to the Admin Console
- go to the Logs & Reports → System Log section
- confirm that the above-triggered fatal error was properly logged (the 1st backtrace frame points to the line with the trigger_error( ... statement in it)
Part 3 - SQL error Web
IMPORTANT: Apply the D567 is applied before testing.
- in the IDE:
- open the core/units/admin/admin_events_handler.php file for editing
- replace the \AdminEventsHandler::OnDeploy method body with the $this->Conn->Query('SELECT * FROM NonExistingTable'); code
- save changes
- enable the Debug Mode
- in Web:
- login to the Admin Console
- go to the Tools → System Tools section
- press the Deploy button
- confirm that an exception (due to an SQL error) is displayed in Debugger
- go to the Logs & Reports → System Log section
- confirm that the above-thrown exception was properly logged (the 1st backtrace frame doesn't point to the line with the throw ... statement in it)