first commit
This commit is contained in:
23
Swoft_BackEndApi/app/Utils/bmob/lib/BmobException.class.php
Executable file
23
Swoft_BackEndApi/app/Utils/bmob/lib/BmobException.class.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* BmobException 异常类
|
||||
* @author jeff
|
||||
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
||||
*/
|
||||
class BmobException extends Exception
|
||||
{
|
||||
public function __construct($message="", $code = 0) {
|
||||
//codes are only set by a bmob.com error
|
||||
if($code != 0){
|
||||
$message = "bmob.cn error: ".$message;
|
||||
}
|
||||
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user