message = $message ?: 'Query failed in database'; $error->queryErrors = (array)$queryErrors; return $error; } /** * Returns the query errors * * @since 2.9.2 * * @return string[] */ public function getQueryErrors() { return $this->queryErrors; } /** * Returns a human readable form of the exception for logging * * @since 2.9.2 * * @return string */ public function getLogOutput() { $queryErrors = array_map( function ($error) { return " - {$error}"; }, $this->queryErrors ); return " Code: {$this->getCode()}\n Message: {$this->getMessage()}\n DB Errors: \n {$queryErrors} "; } }