Page MenuHomePhabricator

Make modular transforms handle exceptions gracefully
ClosedPublic

Authored by epriestley on May 12 2015, 3:20 PM.
Tags
None
Referenced Files
F14055713: D12809.diff
Sat, Nov 16, 3:03 PM
F14043344: D12809.diff
Tue, Nov 12, 9:34 AM
F14033258: D12809.id30828.diff
Sat, Nov 9, 5:12 PM
F14027196: D12809.diff
Fri, Nov 8, 5:53 AM
F14025703: D12809.diff
Thu, Nov 7, 7:49 PM
F14025635: D12809.diff
Thu, Nov 7, 7:07 PM
F14017876: D12809.diff
Tue, Nov 5, 12:21 AM
F13978530: D12809.id30787.diff
Oct 18 2024, 11:39 PM
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.