public static function ErrHandlerImg(Exception $e) { if (!Driver::$silent) { fwrite(STDERR, $e->getMessage() . "\n"); } $errobj = new JpGraphErrObjectImg(); $errobj->Raise($e->getMessage()); exit(1); }
// This will disable to Main SyslogView and show an error message $content['error_occured'] = true; $content['error_details'] = GetErrorMessage($res); if (isset($extraErrorDescription)) { $content['error_details'] .= "\n\n" . GetAndReplaceLangStr($content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription); } } // Close file! $stream->Close(); } else { $content['error_occured'] = true; $content['error_details'] = GetAndReplaceLangStr($content['LN_GEN_ERROR_SOURCENOTFOUND'], $currentSourceID); } } if ($content['error_occured']) { // Use JpGraph to display errors! $myError = new JpGraphErrObjectImg(); $myError->SetTitle($content['LN_GEN_ERRORDETAILS']); if (GetConfigSetting("MiscShowDebugMsg", 0, CFGLEVEL_USER) == 1) { $myError->Raise($content['error_details'] . "\n\nDebug Details: \n" . var_export($content['DEBUGMSG'], true), true); } else { $myError->Raise($content['error_details'], true); } // Exit in any case exit; } // --- // --- Output the image //$graph->Stroke(); $graph->StrokeCSIM(basename(__FILE__), '', 0); // ---