[PHP] PHP5 Exception Handling

2005-02-04 Thread Gerard Samuel
Just bouncing a thought on you. I currently have a default exception handler setup. So far in the code, I throw an exception when something is wrong. i.e. Missing file, invalid argument, failed db connection etc... My thought was centering around if I still needed to use try/catch in the code,

Re: [PHP] PHP5 Exception Handling

2005-02-04 Thread Jochem Maas
Gerard Samuel wrote: Just bouncing a thought on you. I currently have a default exception handler setup. So far in the code, I throw an exception when something is wrong. i.e. Missing file, invalid argument, failed db connection etc... My thought was centering around if I still needed to use

Re: [PHP] PHP5 Exception Handling

2005-02-04 Thread Gerard Samuel
Jochem Maas wrote: Gerard Samuel wrote: Just bouncing a thought on you. I currently have a default exception handler setup. So far in the code, I throw an exception when something is wrong. i.e. Missing file, invalid argument, failed db connection etc... My thought was centering around if I still

[PHP] PHP5 exception handling

2004-07-30 Thread Matthew Weier O'Phinney
I've done some reading on the ZE2 exception handling, but I'm not quite sure I understand how it works. I'm familiar with the following in perl: eval { do some stuff... } if ($@) { report an exception... } Which looks a lot like the following in PHP5: try {

Re: [PHP] PHP5 exception handling

2004-07-30 Thread Curt Zirzow
* Thus wrote Matthew Weier O'Phinney: The problem I'm running into: what do I pass as arguments to catch()? The articles on ZE2 use something like: catch (Exception $e) {}, or something like catch(MyException $e) (where MyException is a class they defined in their examples). Is the

Re: [PHP] PHP5 exception handling

2004-07-30 Thread Jason Davidson
You can check out how exceptions are handled in Java or C++ as well, they all sorta work the same, you may find more complete docs for them. Jason On 30 Jul 2004 14:58:59 -, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: I've done some reading on the ZE2 exception handling, but I'm not

Re: [PHP] PHP5 exception handling

2004-07-30 Thread Matthew Weier O'Phinney
* Curt Zirzow [EMAIL PROTECTED]: * Thus wrote Matthew Weier O'Phinney: The problem I'm running into: what do I pass as arguments to catch()? The articles on ZE2 use something like: catch (Exception $e) {}, or something like catch(MyException $e) (where MyException is a class they

Re: [PHP] PHP5 exception handling

2004-07-30 Thread Tularis
Matthew Weier O'Phinney wrote: * Curt Zirzow [EMAIL PROTECTED]: * Thus wrote Matthew Weier O'Phinney: The problem I'm running into: what do I pass as arguments to catch()? The articles on ZE2 use something like: catch (Exception $e) {}, or something like catch(MyException $e) (where MyException is

Re: [PHP] PHP5 exception handling

2004-07-30 Thread Matthew Weier O'Phinney
* Tularis [EMAIL PROTECTED]: Matthew Weier O'Phinney wrote: * Curt Zirzow [EMAIL PROTECTED]: * Thus wrote Matthew Weier O'Phinney: The problem I'm running into: what do I pass as arguments to catch()? The articles on ZE2 use something like: catch (Exception $e) {}, or something like