Allow GridFS StreamWrapper to throw on error instead of emitting a PHP warning

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.11.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The GridFS StreamWrapper's stream_read and stream_write methods currently catch exceptions from our stream classes and instead trigger PHP warnings and return false. While this complies with the suggested streamWrapper API, it may be more useful to expose users to the original exception instead.

      Before making this change, we should see if might cause adverse affects with PHP's own stream functions (e.g. stream_get_contents()).

      Implementing this would allow us to remove some special handling in our GridFS and unified spec test runners that currently check for PHP warnings instead of exceptions to detect certain GridFS errors.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: