Error & status handling for functions
- by Industrial
Hi everyone,
We're working with a new codeigniter based application that are cross referencing different PHP functions forwards and backwards from various libraries, models and such.
We're running PHP5 on the server and we try to find a good way for managing errors and status reports that arises from the usage of our functions.
While using return in functions, the execution is ended, so nothing more can be sent back. Right?
What's the best practice to send a status information or error code upon ending execution of actual function?
Should we look into using exceptions or any other approach?
http://us.php.net/manual/en/language.exceptions.php