1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-22 21:40:54 +01:00

Improve exception raised when an event listener fails to load

Summary: See IRC. The failing class might not be the listener itself.

Test Plan:
  $ arc list
  ERROR: Failed to load event listener 'depr': Failed to load class or interface 'depr': the class or interface 'depr' is not defined in the library map for any loaded phutil library. If this symbol was recently added or moved, your library map may be out of date. You can rebuild the map by running 'arc liberate'. For more information, see: http://www.phabricator.com/docs/phabricator/article/libphutil_Libraries_User_Guide.html

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7616
This commit is contained in:
epriestley 2013-11-20 12:46:38 -08:00
parent fb8a0d32ae
commit 6dade54efb

View file

@ -304,10 +304,13 @@ try {
} catch (PhutilMissingSymbolException $ex) {
// Continue anwyay, since you may otherwise be unable to run commands
// like `arc set-config events.listeners` in order to repair the damage
// you've caused.
// you've caused. We're writing out the entire exception here because
// it might not have been triggered by the listener itself (for example,
// the listener might use a bad class in its register() method).
$console->writeErr(
"ERROR: Failed to load event listener '%s'!\n",
$listener);
"ERROR: Failed to load event listener '%s': %s\n",
$listener,
$ex->getMessage());
}
}
}