Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:5802 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15273 invoked by uid 1010); 29 Nov 2003 14:58:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15249 invoked from network); 29 Nov 2003 14:58:49 -0000 Received: from unknown (HELO sunshine.home) (62.178.227.34) by pb1.pair.com with SMTP; 29 Nov 2003 14:58:49 -0000 Received: from mfischer by sunshine.home with local (Exim 4.22) id 1AQ6Fh-0002wS-DB for internals@lists.php.net; Sat, 29 Nov 2003 15:39:17 +0100 Date: Sat, 29 Nov 2003 15:39:17 +0100 To: internals@lists.php.net Message-ID: <20031129143917.GA11269@gjat.josefine.at> Mail-Followup-To: Markus Fischer , internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: Vim http://www.vim.org/ X-PGP-Key: 0xC2272BD0 at wwwkeys.eu.pgp.net X-PGP-Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 User-Agent: Microsoft Outlook Express 5.50.4807.1700.314 X-Spamfilter: Fighting it with http://www.spamassassin.org/ and http://razor.sourceforge.net/ Subject: beta2, deriving from class Extension and calling parent::__toString() segfaults From: mfischer@gjat.josefine.at (Markus Fischer) When trying to derive from class Exception and access the 'string' property or call 'parent::__toString' PHP segfaults: string); } } throw new MyException("hmm"); ?> Output: $ php testException.php NULL Segmentation fault Or this example: Output: $ php testException.php Segmentation fault The need for this came up when I saw that the reported exception is not foramted in the HTML output; it's quite hard next to impossible to properly read the stack trace. So my goal was to make my own exception and call nl2br() on the string returned from the class. Besides the segfaults above, is there a chance we have a nicer HTML formatting for reported Exceptions (while still strip those HTML tags from it for logging)? - Markus