Page MenuHomePhabricator

Make modular transforms handle exceptions gracefully
ClosedPublic

Authored by epriestley on May 12 2015, 3:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 3:16 AM
Unknown Object (File)
Mon, Apr 29, 2:43 PM
Unknown Object (File)
Mon, Apr 29, 12:45 PM
Unknown Object (File)
Thu, Apr 25, 1:29 PM
Unknown Object (File)
Thu, Apr 25, 1:29 PM
Unknown Object (File)
Thu, Apr 25, 1:29 PM
Unknown Object (File)
Wed, Apr 24, 10:45 PM
Unknown Object (File)
Wed, Apr 24, 10:16 AM
Subscribers

Details

Summary

Ref T7707. Ref T2479. Ref T5258.

The thumbnailing code is some of the only code in the codebase which doesn't use exceptions to handle errors. I'm going to convert it to use exceptions; make sure they do something reasonable at top level.

Strategy here is:

  • By default, we just fall back to a placeholder image if anything goes wrong.
  • Later, I'll likely add a "debug" workflow from the new "Transforms" UI which will surface the specific exception instead (the code can't really raise any interesting exceptions right now).
Test Plan

Faked an exception and saw some reasonable default images.

Diff Detail

Repository
rP Phabricator
Branch
fxform3
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/files/controller/PhabricatorFileTransformController.php:60XHP16TODO Comment
Unit
No Test Coverage
Build Status
Buildable 5920
Build 5940: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Make modular transforms handle exceptions gracefully.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.May 12 2015, 6:26 PM
This revision was automatically updated to reflect the committed changes.