src/DB/PDO/Connection.php
protected function logError( PDOException $exception, $statement ){
		if( !$this->logFileErrors )
			return;
//			throw $exception;
		$info		= $exception->errorInfo;
		$sqlError	= isset( $info[2] ) ? $info[2] : NULL;
		$sqlCode	= $info[1];
		$pdoCode	= $info[0];
		$message	= $exception->getMessage();
		$statement	= preg_replace( "@\r?\n@", " ", $statement );
		$statement	= preg_replace( "@  +@", " ", $statement );

		$note	= self::$errorTemplate;
		$note	= str_replace( "{time}", time(), $note );
		$note	= str_replace( "{sqlError}", $sqlError, $note );
		$note	= str_replace( "{sqlCode}", $sqlCode, $note );
		$note	= str_replace( "{pdoCode}", $pdoCode, $note );
		$note	= str_replace( "{message}", $message, $note );
		$note	= str_replace( "{statement}", $statement, $note );

		error_log( $note, 3, $this->logFileErrors );
		throw new \Exception_SQL( $sqlError, $sqlCode, $pdoCode );
	}
protected function logError( PDOException $exception, $statement ){
		if( !$this->logFileErrors )
			return;
//			throw $exception;
		$info		= $exception->errorInfo;
		$sqlError	= isset( $info[2] ) ? $info[2] : NULL;
		$sqlCode	= $info[1];
		$pdoCode	= $info[0];
		$message	= $exception->getMessage();
		$statement	= preg_replace( "@\r?\n@", " ", $statement );
		$statement	= preg_replace( "@  +@", " ", $statement );

		$note	= self::$errorTemplate;
		$note	= str_replace( "{time}", time(), $note );
		$note	= str_replace( "{sqlError}", $sqlError, $note );
		$note	= str_replace( "{sqlCode}", $sqlCode, $note );
		$note	= str_replace( "{pdoCode}", $pdoCode, $note );
		$note	= str_replace( "{message}", $message, $note );
		$note	= str_replace( "{statement}", $statement, $note );

		error_log( $note, 3, $this->logFileErrors );
		throw new \Exception_SQL( $sqlError, $sqlCode, $pdoCode );
	}
protected function logError ( PDOException $ exception , $ statement ) { if ( ! $ this -> logFileErrors ) return ; //			throw $exception; $ info = $ exception -> errorInfo ; $ sqlError = isset ( $ info [ 2 ] ) ? $ info [ 2 ] : NULL ; $ sqlCode = $ info [ 1 ] ; $ pdoCode = $ info [ 0 ] ; $ message = $ exception -> getMessage ( ) ; $ statement = preg_replace ( "@\r?\n@" , " " , $ statement ) ; $ statement = preg_replace ( "@  +@" , " " , $ statement ) ; $ note = self :: $ errorTemplate ; $ note = str_replace ( "{time}" , time ( ) , $ note ) ; $ note = str_replace ( "{sqlError}" , $ sqlError , $ note ) ; $ note = str_replace ( "{sqlCode}" , $ sqlCode , $ note ) ; $ note = str_replace ( "{pdoCode}" , $ pdoCode , $ note ) ; $ note = str_replace ( "{message}" , $ message , $ note ) ; $ note = str_replace ( "{statement}" , $ statement , $ note ) ; error_log ( $ note , 3 , $ this -> logFileErrors ) ; throw new \ Exception_SQL ( $ sqlError , $ sqlCode , $ pdoCode ) ; }
Notes Information from PDO Exception in Error Log File and throw SQL Exception.
@access		protected
@param		PDOException	$e				PDO Exception thrown by invalid SQL Statement
@param		string			$statement		SQL Statement which originated PDO Exception
@return		void
Notes Information from PDO Exception in Error Log File and throw SQL Exception .