diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-12 15:48:22 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-12 15:48:22 +0200 |
commit | f7dc07602b9f6dcc18e2256f88c4ad011547ab02 (patch) | |
tree | 95eef644ca40757227e0c31083fb6976b1be6262 /lib | |
parent | a39ecd5ea977f18fac9c7c3683a7988434f6b95f (diff) | |
download | nextcloud-server-f7dc07602b9f6dcc18e2256f88c4ad011547ab02.tar.gz nextcloud-server-f7dc07602b9f6dcc18e2256f88c4ad011547ab02.zip |
minor cleanup for exception handling
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/db.php b/lib/db.php index 080e895e352..cd96bcf9d31 100644 --- a/lib/db.php +++ b/lib/db.php @@ -568,10 +568,6 @@ class OC_DB { self::raiseExceptionOnError($definition,'Failed to parse the database definition'); - // Die in case something went wrong - if( $definition instanceof MDB2_Schema_Error ) { - OC_Template::printErrorPage( $definition->getMessage().': '.$definition->getUserInfo() ); - } if(OC_Config::getValue('dbtype', 'sqlite')==='oci') { unset($definition['charset']); //or MDB2 tries SHUTDOWN IMMEDIATE $oldname = $definition['name']; @@ -921,7 +917,7 @@ class OC_DB { } } /** - * check if a result is an error, writes a log entry and throws an exception, works with MDB2 and PDOException + * check if a result is an error and throws an exception, works with MDB2 and PDOException * @param mixed $result * @param string message * @return void @@ -934,7 +930,7 @@ class OC_DB { } else { $message .= ', Root cause:' . self::getErrorMessage($result); } - throw new DatabaseException($message, getErrorCode($result)); + throw new DatabaseException($message, self::getErrorCode($result)); } } |