library/Services/Library/DatabaseHandler.php
protected function checkForDatabaseError($query, $callingFunctionName)
    {
        $dbCon = $this->getDbConnection();
        if (is_a($dbCon, 'PDO') && ('00000' !== $dbCon->errorCode())) {
            $errorInfo = $dbCon->errorInfo();
            throw new Exception('PDO error code: ' . $dbCon->errorCode() . ' in function ' . $callingFunctionName . ' -- ' . $errorInfo[2] . ' -- ' . $query);
        }
    }
protected function checkForDatabaseError($query, $callingFunctionName)
    {
        $dbCon = $this->getDbConnection();
        if (is_a($dbCon, 'PDO') && ('00000' !== $dbCon->errorCode())) {
            $errorInfo = $dbCon->errorInfo();
            throw new Exception('PDO error code: ' . $dbCon->errorCode() . ' in function ' . $callingFunctionName . ' -- ' . $errorInfo[2] . ' -- ' . $query);
        }
    }
protected function checkForDatabaseError ( $ query , $ callingFunctionName ) { $ dbCon = $ this -> getDbConnection ( ) ; if ( is_a ( $ dbCon , 'PDO' ) && ( '00000' !== $ dbCon -> errorCode ( ) ) ) { $ errorInfo = $ dbCon -> errorInfo ( ) ; throw new Exception ( 'PDO error code: ' . $ dbCon -> errorCode ( ) . ' in function ' . $ callingFunctionName . ' -- ' . $ errorInfo [ 2 ] . ' -- ' . $ query ) ; } }
Check for error code in database connection.

@param string $query
@param string $callingFunctionName

@throws Exception
Check for error code in database connection .