try catch的简单使用
```
try {
CatalogService::test();
} catch (Exception $e) {
return $this->jsonError($e->getMessage());
}
CatalogService
public static function test(){
throw new Exception("出现错误");
}
```
try catch的简单使用
```
try {
CatalogService::test();
} catch (Exception $e) {
return $this->jsonError($e->getMessage());
}
CatalogService
public static function test(){
throw new Exception("出现错误");
}
```