Welcome Guest, Not a member yet? Register   Sign In
Exception handling
#1

[eluser]movmer[/eluser]
How do I setup Exception handling in CI?

For instance: If I get a unique key violation exception, I want to send the message back to the view that the user was working on instead of a different error page. How do I do that?

Code:
MyModel extends Model{

function register() {
  try {
  }
  catch(Exception $e)
    // Here I wamt to catch log the message and send it back to the controller or view?
  }

}

Thanks
Movmer


Messages In This Thread
Exception handling - by El Forum - 07-29-2008, 05:49 AM
Exception handling - by El Forum - 07-29-2008, 06:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB