I implemented a rollback mechanism for my php execution so if an error occurs it will pop a stack and undo actions. How can I add this hook so my function is called anytime show_error is used?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Actually there is no such hook available.You need to hack it.
Modify the function "show_error()" in CI_Exceptions class (File: system/libraries/Exceptions.php) as per your Requirement.
This should be a reference to start with.
Update:
You should extent CI_Exceptions rather then modifying in-place.
标签:
codeigniter