Example #1
0
/**
 * @param E|string|Phrase $e
 * @return string|Phrase
 */
function df_ets($e)
{
    return !$e instanceof E ? $e : ($e instanceof DFE ? $e->message() : $e->getMessage());
}
Example #2
0
/**
 * @internal
 *
 * Logs a PHP exception into the default error log
 *
 * @param Exception $e The exception to log
 *
 * @return void
 */
function logException(Exception $e)
{
    $message = $e->getMessage();
    $file = $e->getFile();
    $line = $e->getLine();
    $backTrace = $e->getTrace();
    if ($e instanceof MException) {
        $message = $e->message();
    }
    logError(E_USER_ERROR, $message, $file, $line, $backTrace);
}