Page MenuHomePhabricator

Unsquelch errors when specifying bad environments to ExecFuture
ClosedPublic

Authored by epriestley on Dec 30 2014, 7:21 PM.
Tags
None
Referenced Files
F14008351: D11092.diff
Tue, Oct 29, 7:48 PM
F13998437: D11092.id26624.diff
Thu, Oct 24, 9:23 AM
F13984503: D11092.id26624.diff
Sun, Oct 20, 1:52 PM
F13974669: D11092.id26710.diff
Fri, Oct 18, 6:44 AM
Unknown Object (File)
Sun, Oct 13, 10:09 AM
Unknown Object (File)
Sep 12 2024, 8:17 AM
Unknown Object (File)
Sep 8 2024, 1:37 AM
Unknown Object (File)
Sep 6 2024, 12:36 AM
Subscribers

Details

Summary

I accidentally passed a nonsense value to setEnv() on an ExecFuture (some non-string-like object).

This ended up trying to convert to a string inside proc_open(), but the @ and PhutilErrorTrap stopped it from ever getting printed or logged, so I had zero clue what was going on (daemon mysteriously exited with an error but no message).

Instead, make sure we string-cast all of env + cwd before we start trapping errors. They'll now throw first, and the exceptions will escape properly.

Test Plan
  • Mysterious silent crash turned into nice error message showing that I screwed up a variable when building the env.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Unsquelch errors when specifying bad environments to ExecFuture.
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.Dec 30 2014, 8:06 PM
This revision was automatically updated to reflect the committed changes.