Homec4science

Make modular transforms handle exceptions gracefully

Authored by epriestley <git@epriestley.com> on May 12 2015, 17:16.

Description

Make modular transforms handle exceptions gracefully

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5258, T2479, T7707

Differential Revision: https://secure.phabricator.com/D12809

Details

Committed
epriestley <git@epriestley.com>May 13 2015, 20:38
Pushed
aubortJan 31 2017, 17:16
Parents
rPHc998e44b5a35: Modularize file transforms and provide a "transforms" UI
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH65ff40844ba8: Make modular transforms handle exceptions gracefully (authored by epriestley <git@epriestley.com>).May 13 2015, 20:38