]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/database/class_BaseDatabaseWrapper.php
Renamed frontend to backend because it is a backend ...
[core.git] / inc / classes / main / database / class_BaseDatabaseWrapper.php
index 1ca253c8fcff68d9c7a4719ccebe41d4540c59cb..31a63a39d3d162a36db6066965bafbde4a5cb4cb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -127,6 +127,15 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                return $this->getDatabaseInstance()->getIndexKey();
        }
 
+       /**
+        * Getter for last exception
+        *
+        * @return      $lastException  Last exception or NULL if none occured
+        */
+       public final function getLastException () {
+               return $this->getDatabaseInstance()->getLastException();
+       }
+
        /**
         * Do a "select" query on the current table with the given search criteria and
         * store it in cache for later usage
@@ -160,8 +169,8 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                        } else {
                                // This invalid result must be wrapped
                                $result = array(
-                                       BaseDatabaseFrontend::RESULT_INDEX_STATUS    => 'invalid',
-                                       BaseDatabaseFrontend::RESULT_INDEX_EXCEPTION => $this->getDatabaseInstance()->getLastException()
+                                       BaseDatabaseBackend::RESULT_INDEX_STATUS    => 'invalid',
+                                       BaseDatabaseBackend::RESULT_INDEX_EXCEPTION => $this->getDatabaseInstance()->getLastException()
                                );
                        }
                }