Welcome Guest, Not a member yet? Register   Sign In
Error/Exception handling

How would I best use exceptions in Codeigniter? Do I just throw a new Exception and then catch it somewhere? Does that stop the execution of the code in the current file only or do exceptions bubble up and stop everything? Do they get logged by CI? When they are thrown or when they are caught? Does CI show an error message automatically or do I need to use show_error()?

I have a series of nested models with methods wrapped in transactions. If a transaction in a submodel fails I would assume that the parent transaction also fails? So really I don't need exceptions?

How would I best communicate something like 'No rows returned' to a parent model' as I would still like to return $this to preserve the already set attributes?

Can someone clarify some of these concepts?

Messages In This Thread
Error/Exception handling - by El Forum - 12-24-2010, 10:28 AM
Error/Exception handling - by El Forum - 12-25-2010, 10:07 AM

Theme © iAndrew 2016 - Forum software by © MyBB