Re: php_stream_display_wrapper_errors issue

From: Date: Mon, 14 Apr 2008 14:55:21 +0000
Subject: Re: php_stream_display_wrapper_errors issue
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-37003@lists.php.net to get a copy of this message
Pierre Joye wrote: > Hi Greg, > > On Mon, Apr 14, 2008 at 12:17 AM, Gregory Beaver <greg@chiaraquartet.net> wrote: > >> Hi, >> >> If a stream wrapper does not log errors, by default, we grab >> strerror(errno) to figure out the error message, but this is not a good >> idea for any wrapper but plain_wrapper for the obvious reason that errno >> is not used by wrappers that don't use sys calls. >> >> Is this patch against 5.3 acceptable (I'll merge to HEAD on commit if so)? >> > > I think it fixes the possible misguided error messages. To go one step > further, I wonder if it would make sense to add a stream_strno and > stream_strerror to _php_stream_wrapper_ops. It may be helpful to > display the actual error or for debugging purposes (user land or > internally). Comments? Hi, In theory, a stream wrapper should be using php_stream_wrapper_log_error() for all errors, so I think stream_strerror should be unnecessary. Thanks, Greg

« previous php.internals (#37003) next »