# Error reporting behavior with streams

- Thread: https://externals.io/message/6715
- Original archive: https://news-web.php.net/php.internals/6715
- Started by Zeev Suraski on 2003-12-25T17:32:47+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #6715 — Zeev Suraski — 2003-12-25T17:32:47+00:00

URL: https://externals.io/message/6715#6715

People,

When streams were introduced, the format of error messages involving 
include/require changed significantly, and now emits two errors instead of 
one.  Am I the only one being bugged by this?  I think we can simply remove 
the REPORT_ERRORS option from php_fopen_wrapper_for_zend().  Possibly, if 
there are cases where php_stream_open_wrapper_as_file() can report 
something smarter than just the inability to create the stream, we can add 
an option such as REPORT_NONTRIVIAL_ERRORS, so that if the stream-level 
error has something smart to say, it won't go unnoticed.

Thoughts?

Zeev

---

## #6716 — George Schlossnagle — 2003-12-25T17:36:58+00:00

URL: https://externals.io/message/6715#6716 · In reply to: #6715

> People,
>
> When streams were introduced, the format of error messages involving 
> include/require changed significantly, and now emits two errors 
> instead of one.  Am I the only one being bugged by this?  I think we 
> can simply remove the REPORT_ERRORS option from 
> php_fopen_wrapper_for_zend().  Possibly, if there are cases where 
> php_stream_open_wrapper_as_file() can report something smarter than 
> just the inability to create the stream, we can add an option such as 
> REPORT_NONTRIVIAL_ERRORS, so that if the stream-level error has 
> something smart to say, it won't go unnoticed.
>
> Thoughts?

I agree with you.  Not only are their two errors, but the error for 
include/require specifically is not as clear as it once was.

George
