Merge pull request #4862 from owncloud/db_to_public

Add OCP\DB::getErrorMessage() to public namespace.
This commit is contained in:
Thomas Müller 2013-09-16 00:51:12 -07:00
commit c20f01bbf0
1 changed files with 11 additions and 0 deletions

View File

@ -102,4 +102,15 @@ class DB {
public static function isError($result) {
return(\OC_DB::isError($result));
}
/**
* returns the error code and message as a string for logging
* works with DoctrineException
* @param mixed $error
* @return string
*/
public static function getErrorMessage($error) {
return(\OC_DB::getErrorMessage($error));
}
}