Hello Stephane, Tuesday, February 17, 2004, 10:57:02 AM, you wrote:
> == Quote from Marcus Boerger ([EMAIL PROTECTED])'s article >> No those are read access members to private property members. When you lok >> at the exception class: >> php -r 'reflection_class::export("exception");' >> then you'll encounter that you can overload __toString() and the >> __construct(). Or in other words you should use 'print $e' or '(string)$e' >> or '$e->__toString()'. > If we can only overload __toString() to have different information > displayed (not presentation, but information), the class will be > inconsistent. Moreover, if the exception is not caught, PHP will display > it using the Exception's members, not the overloaded __toString(). You can still add whatever properties you want even in not overloaded exceptions and you can add new methods in overloaded classes. And yes at the moment the exception class generates the presentation only once and ignores the __toString() method when displaying uncaught exceptions. But then again you shouldn't have uncaught exceptions being displayed in any nice fashion. They exist only to help you develop your programs. So still i do not see any reason to change the current behavior - the only thing i could think of is somehow magically add '<pre>' ... '</pre>' to the uncaught exception display facility. -- Best regards, Marcus mailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php