/**
  * Prints the error page.
  */
 public function show()
 {
     $this->information .= '<b>sql type:</b> ' . StringUtil::encodeHTML($this->getDBType()) . '<br />';
     $this->information .= '<b>sql error:</b> ' . StringUtil::encodeHTML($this->getErrorDesc()) . '<br />';
     $this->information .= '<b>sql error number:</b> ' . StringUtil::encodeHTML($this->getErrorNumber()) . '<br />';
     $this->information .= '<b>sql version:</b> ' . StringUtil::encodeHTML($this->getSQLVersion()) . '<br />';
     if ($this->preparedStatement !== null) {
         $this->information .= '<b>sql query:</b> ' . StringUtil::encodeHTML($this->preparedStatement->getSQLQuery()) . '<br />';
         $parameters = $this->preparedStatement->getSQLParameters();
         if (!empty($parameters)) {
             foreach ($parameters as $index => $parameter) {
                 $this->information .= '<b>sql query parameter ' . $index . ':</b>' . StringUtil::encodeHTML($parameter) . '<br />';
             }
         }
     }
     parent::show();
 }
示例#2
0
 /**
  * Logs cronjob exec success or failure.
  * 
  * @param	wcf\data\cronjob\CronjobEditor		$logEditor
  * @param	wcf\system\exception\SystemException	$exception
  */
 protected function logResult(CronjobLogEditor $logEditor, SystemException $exception = null)
 {
     if ($exception !== null) {
         $errString = implode("\n", array($exception->getMessage(), $exception->getCode(), $exception->getFile(), $exception->getLine(), $exception->getTraceAsString()));
         $logEditor->update(array('success' => 0, 'error' => $errString));
     } else {
         $logEditor->update(array('success' => 1));
     }
 }
 /**
  * Creates a new PackageArchiveValidationException.
  * 
  * @param	integer		$code
  * @param	array<string>	$details
  */
 public function __construct($code, array $details = array())
 {
     $this->details = $details;
     parent::__construct($this->getLegacyMessage($code), $code);
 }