#37665 [Opn->Fbk]: Exception messages from stream wrappers should be displayed

From: Date: Thu, 01 Jun 2006 11:58:34 +0000
Subject: #37665 [Opn->Fbk]: Exception messages from stream wrappers should be displayed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-97920@lists.php.net to get a copy of this message
ID: 37665 Updated by: tony2001@php.net Reported By: flconseil at yahoo dot fr -Status: Open +Status: Feedback Bug Type: Feature/Change Request Operating System: All PHP Version: 5.1.4 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2006-06-01 11:57:16] flconseil at yahoo dot fr Description: ------------ When I send an exception from a stream wrapper method, the call fails with a generic warning message from PHP, but the message I sent with my exception is not displayed. It would be a useful enhancement to add it to the error string. (Tested in 5.1.2, should be the same in 5.1.4) Reproduce code: --------------- Example of an invalid URL : include('phk://mnt1/toto'); Expected result: ---------------- If the exception->message was also displayed, it would give something like : PHP Warning: include(phk://mnt1/toto): failed to open stream: Error opening PHK subfile - phk://mnt1/toto: Invalid URL - mnt1: Unknown PHK mount point - "PHK_Stream::stream_open" call failed in ... on line 6 Actual result: -------------- PHP Warning: include(phk://mnt1/toto): failed to open stream: "PHK_Stream::stream_open" call failed in ... on line 6 I have no way to tell the user why his URL failed. And, as STREAM_REPORT_ERRORS is unset, I am not allowed to raise any error from my code. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37665&edit=1

« previous php.bugs (#97920) next »