Child pages
  • [system log] Error output not adapted for CLI usage [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

When "Fatal Error" or "Exception" happens during script execution from CLI (e.g. when using new Console tool), then it's displayed in way, that is only friendly for Web Page:

<div style="background-color: #FEFFBF; margin: auto; padding: 10px; border: 2px solid red; text-align: center"><strong>Fatal Error: </strong>Cannot use object of type stdClass as array in .../core/kernel/Console/Command/RunPhingCommand.php on line 107</div>

Solution

  1. don't use HTML
  2. show stack trace

Built-in stack trace from unhandled PHP exceptions:

PHP Fatal error:  Uncaught exception 'Exception' with message 'IntuitAnywhere login failed' in /path/to/project/modules/custom/units/helpers/quickbooks/QBConnectorHelper.php:91
Stack trace:
#0 /path/to/project/core/kernel/utility/factory.php(118): QBConnectorHelper->Init('QBConnectorHelp...', '', Array)
#1 /path/to/project/core/kernel/application.php(2492): kFactory->getObject('QBConnectorHelp...', NULL, Array)
#2 /path/to/project/modules/custom/units/helpers/quick_books_helper.php(296): kApplication->recallObject('QBConnectorHelp...')
#3 /path/to/project/modules/custom/units/organizations/organization_eh.php(1328): IntechnicQuickBooksHelper->synchronizeVendor(Array)
#4 /path/to/project/modules/custom/units/organizations/organization_eh.php(201): OrganizationEventHandler->synchronizeSuppliers(1447405965)
#5 /path/to/project/core/kernel/event_handler.php(116): OrganizationEventHandler->OnQuickBooksSynchronize(Object(kEvent))
#6 /mn in /path/to/project/modules/custom/units/helpers/quickbooks/QBConnectorHelper.php on line 91

The pretty stack trace from Symfony Console applications:

Related Tasks

INP-1522 - Getting issue details... STATUS