Browse Source

Add OCP\DB::getErrorMessage() to public namespace.

tags/v6.0.0alpha2
Thomas Tanghus 10 years ago
parent
commit
eab84d3d96
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      lib/public/db.php

+ 11
- 0
lib/public/db.php 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));
}

}

Loading…
Cancel
Save