[PHP] Re: [PHP-DEV] Re: [PHP] Exceptions: function x throws Exception

2005-08-06 Thread Marcus Boerger
Hello Jochem, lookup the archieves. We have long ago decided agains that. marcus Friday, August 5, 2005, 2:26:04 PM, you wrote: Dear Internals, class FooBar { public function foo() throws Exception {} } function fooFoo() throws Exception {} this came up on php-generals and I

[PHP] Re: [PHP-DEV] Re: [PHP] Exceptions: function x throws Exception

2005-08-06 Thread Jochem Maas
Marcus Boerger wrote: Hello Jochem, lookup the archieves. We have long ago decided agains that. I'll take your word on it. :-) (shame on me for not searching harder before asking) thanks for replying. marcus Friday, August 5, 2005, 2:26:04 PM, you wrote: Dear Internals, class

[PHP] Exceptions: function x throws Exception

2005-08-05 Thread Norbert Wenzel
If there is a class with a function, that might throw exceptions and does NOT catch them, may I write that like in Java? class FooClass { public function foo() throws Exception { } } Or is there another possibility to tell a function throws an exception and to force the

Re: [PHP] Exceptions: function x throws Exception

2005-08-05 Thread Torgny Bjers
Norbert Wenzel wrote: If there is a class with a function, that might throw exceptions and does NOT catch them, may I write that like in Java? class FooClass { public function foo() throws Exception { } } Or is there another possibility to tell a function throws an

Re: [PHP] Exceptions: function x throws Exception

2005-08-05 Thread Norbert Wenzel
Torgny Bjers wrote: The Java way doesn't work here. The best approach would be to simply run a try/catch/finally around the call to your function/method, and inside the function itself you do the following: if (...) { throw new Exception(My message.); } } Hello Torgny, Thanky you for your

Re: [PHP] Exceptions: function x throws Exception

2005-08-05 Thread Jochem Maas
Dear Internals, class FooBar { public function foo() throws Exception {} } function fooFoo() throws Exception {} this came up on php-generals and I wondered if anyone had time/cared to comment if it (as it does to me) seems like a good idea and/or whether it is technically feasable. My