Exception handler, deals with all high level exceptions (caught in oxShopControl)
◆ __construct()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::__construct |
( |
|
$iDebug = 0 | ) |
|
Class constructor
- Parameters
-
integer | $iDebug | debug level |
◆ __call()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::__call |
( |
|
$sMethod, |
|
|
|
$aArgs |
|
) |
| |
Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods
- Parameters
-
string | $sMethod | Methods name |
array | $aArgs | Argument array |
- Exceptions
-
- Returns
- string
◆ displayDebugMessage()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::displayDebugMessage |
( |
|
$exception, |
|
|
|
$logWritten = true |
|
) |
| |
|
protected |
Print a debug message to the screen.
- Parameters
-
\Throwable | $exception | The exception to be treated |
bool | $logWritten | True, if an entry was written to the log file |
- Deprecated:
- since v6.3 (2018-04-25); This method will be removed completely. Use an appropriate Monolog channel in the future.
- Returns
- null
◆ displayOfflinePage()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::displayOfflinePage |
( |
| ) |
|
Render an error message. If offline.html exists its content is displayed. Like this the error message is overridable within that file. Do not display an error message, if this file is included during a CLI command
- Deprecated:
- since v6.3 (2018-04-25); This method will be private. Use \oxTriggerOfflinePageDisplay() in the future.
- Returns
- null
◆ exitApplication()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::exitApplication |
( |
| ) |
|
|
protected |
Exit the application with error status 1
◆ getFormattedException()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::getFormattedException |
( |
|
$exception | ) |
|
Return a formatted exception to be written to the log file.
- Parameters
-
- Deprecated:
- since v6.3 (2018-04-25); This method will be removed completely. Use an appropriate Monolog channel in the future.
- Returns
- string
◆ getLogFileName()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::getLogFileName |
( |
| ) |
|
Get log file path/name
- Deprecated:
- since v5.3 (2016-06-17); Logging mechanism will change in the future.
- Returns
- string
◆ handleDatabaseException()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::handleDatabaseException |
( |
\OxidEsales\Eshop\Core\Exception\DatabaseException |
$exception | ) |
|
Report the exception and in case that iDebug is not set, redirect to maintenance page. Special methods are used here as the normal exception handling routines always need a database connection and this would create a loop.
- Parameters
-
\OxidEsales\Eshop\Core\Exception\DatabaseException | $exception | Exception to handle |
◆ handleUncaughtException()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::handleUncaughtException |
( |
\Throwable |
$exception | ) |
|
Handler for uncaught exceptions. As this is the las resort no fancy business logic should be applied here.
- Parameters
-
\Throwable | $exception | exception object |
- Exceptions
-
◆ setIDebug()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::setIDebug |
( |
|
$iDebug | ) |
|
Set the debug level
- Parameters
-
int | $iDebug | debug level (0== no debug) |
- Deprecated:
- since v6.3 (2018-04-25); This method will be removed completely. Use an appropriate Monolog channel in the future.
◆ setLogFileName()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::setLogFileName |
( |
|
$fileName | ) |
|
Set log file name. The file will always be created in the same directory as OX_LOG_FILE
- Deprecated:
- since v5.3 (2016-06-17); Logging mechanism will change in the future.
- Parameters
-
◆ writeExceptionToLog()
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::writeExceptionToLog |
( |
|
$exception | ) |
|
Write a formatted log entry to the log file.
- Parameters
-
- Deprecated:
- since v6.3 (2018-04-25); This method will be private. Use Registry::getLogger() to log error messages in the future.
- Returns
- bool
◆ $_iDebug
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::$_iDebug = 0 |
|
protected |
◆ $_sFileName
OxidEsales\EshopCommunity\Core\Exception\ExceptionHandler::$_sFileName |
|
protected |
The documentation for this class was generated from the following file: