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

[eluser]Unknown[/eluser]
Hi!

I have been wondering what the most efficient way would be to handle exceptions in CodeIgniter, especially when I call CI functions.

For example

Code:
$this->load->library('email');
...
try {
  $this->email->send();
}
catch (Exception $e) {
    echo 'Email send exception caught: ',  $e->getMessage(), "\n";
}

do CI functions generate exceptions? how can they be caught?




Theme © iAndrew 2016 - Forum software by © MyBB