#37665 [NEW]: Exception messages from stream wrappers should be displayed
| From: | flconseil at yahoo dot fr | Date: | Thu, 01 Jun 2006 11:57:16 +0000 |
| Subject: | #37665 [NEW]: Exception messages from stream wrappers should be displayed | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-97919@lists.php.net to get a copy of this message | ||
From: flconseil at yahoo dot fr
Operating system: All
PHP version: 5.1.4
PHP Bug Type: Feature/Change Request
Bug description: Exception messages from stream wrappers should be displayed
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 bug report at http://bugs.php.net/?id=37665&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37665&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37665&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37665&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37665&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37665&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37665&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37665&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37665&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37665&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37665&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37665&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37665&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37665&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37665&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37665&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37665&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37665&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37665&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37665&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37665&r=mysqlcfg