Hello Stephane,

i had reasons to make that property private. You may use getTrace() to
read the contents and if you must overwrite it because you want to misuse
the whole thing then you can overwrite the read access method, too. This
should be enough, right?

Friday, January 23, 2004, 10:54:53 AM, you wrote:

> Hello Marcus,

> Hum... you fixed the issue but not really in the way I expected it. Now my code does 
> not work...

> My message was not only to report a bug, but to ask *not* to fix it as
> expected. Particularly to put the "trace" member as protected, (or
> "getTrace()" as virtual and not final).

> Remember my code:

> <?
> class SystemException extends Exception {
>   function __construct($message, $code) {
>     parent::__construct($message, $code);
>     // Hide trace of handler() call.
>     array_splice($this->trace, 0, 1);
>     $this->file = $this->trace[0]['file'];
>     $this->line = $this->trace[0]['line'];
>   }

>   static function handler($code, $message) {
>     throw new SystemException($message, $code);
>   }
> }

> set_error_handler(array('SystemException', 'handler'));
?>>

> Indeed, I'm no more able to modify the trace, so if I want to report
> the real file and line (I mean the interresting ones, so those in
> trace[1]), they won't be coherent with the back trace.

> Why could you accept a derived class to modify "file" and "line" members, and not 
> the "trace" one?

> My original message was also to limit the use of private and final
> modifiers, as they go against inheritance.

> Regards,
> Stephane




-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to