예제 #1
0
 /**
  * The constructor.
  *
  * @param int $code error code, must be >= 0
  */
 public function __construct($code = 0)
 {
     $message = 'The database query returned an empty result, but should have returned a non-empty result.';
     if ($GLOBALS['TYPO3_DB']->store_lastBuiltQuery || $GLOBALS['TYPO3_DB']->debugOutput) {
         $message .= LF . 'The last built query:' . LF . $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery;
     }
     parent::__construct($message, $code);
 }
예제 #2
0
 /**
  * The constructor.
  *
  * @param int $code error code, must be >= 0
  */
 public function __construct($code = 0)
 {
     /** @var DatabaseConnection $databaseConnection */
     $databaseConnection = $GLOBALS['TYPO3_DB'];
     $message = 'There was an error with the database query.' . LF . $databaseConnection->sql_error();
     if ($databaseConnection->store_lastBuiltQuery || $databaseConnection->debugOutput) {
         $message .= LF . 'The last built query:' . LF . $databaseConnection->debug_lastBuiltQuery;
     }
     parent::__construct($message, $code);
 }