[Corona] Throw if JSONView encoding fails

Review Request #676 — Created Aug. 28, 2019 and discarded

smillernl
Lunr
fix/throw_on_json_fail
675
lunr

Throw if JSONView encoding fails



  • 1
  • 0
  • 1
  • 0
  • 2
Description From Last Updated
Not good enough. We need to have actual test values here that trigger the actual behavior pprkut pprkut
smillernl
pprkut
  1. 
      
  2. src/Lunr/Corona/JsonView.php (Diff revision 1)
     
     
    The issue has been resolved. Show all issues

    InternalServerErrorException doesn't add anything here. There's no RequestResultHandler catching to it would just end up as an uncaught exception, potentially triggering print_fatal_error(), which hardcodes 500.

    There's also a chance that it won't trigger print_fatal_error and only show an empty output

  3. src/Lunr/Corona/Tests/JsonViewPrintTest.php (Diff revision 1)
     
     
     
    An issue was opened. Show all issues

    Not good enough. We need to have actual test values here that trigger the actual behavior

    1. I can't figure out how to do that.

  4. 
      
smillernl
Review request changed

Status: Discarded

Change Summary:

https://github.com/lunr-php/lunr/pull/22

Loading...