标签: codeigniter try-catch
尝试使用catch block在codeigniter中不起作用。
try { echo inverse(5) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; return; }
答案 0 :(得分:0)
您需要在codeigniter中添加自定义异常处理。 请尝试使用以下链接:
http://thecancerus.com/simple-way-to-add-global-exception-handling-in-codeigniter/
CodeIgniter: Try Catch is not working in model class