protected function printError()
{
if ($caller = \Resources\RunException::getErrorCaller(5)) {
$error_str = sprintf('Database error %1$s for query %2$s made by %3$s', $this->lastError, $this->lastQuery, $caller);
} else {
$error_str = sprintf('Database error %1$s for query %2$s', $this->lastError, $this->lastQuery);
}
\Resources\RunException::outputError($error_str);
}