try { // code } catch (class1 $var) { } catch (class2 $var) { } catch ($var) { }
I thought that only objects of the Exception class and subclasses thereof can be throw()n.
If that is not the case yet, make it so and
try { /* code */ }
catch (SomeException $e) {} catch (Exception $e) {}
works just fine ;-)
An alternative concept would be to allow throwing exception instances only.
See above ;)
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php