[Corona] Throw if JSONView encoding fails

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

smillernl
Lunr
fix/throw_on_json_fail
675
e516764...
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
Review request changed

Commit:

-6d38f6f53451275bfe5a46f49cf75e94a32bbc3d
+e516764c85b4e700fb3e8f7ca27e98637f925752

Diff:

Revision 2 (+64 -2)

Show changes

pprkut
  1. 
      
  2. src/Lunr/Corona/JsonView.php (Diff revision 1)
     
     

    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)
     
     
     

    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. 
      
Loading...