From: epriestley Date: Wed, 20 Nov 2013 20:46:38 +0000 (-0800) Subject: Improve exception raised when an event listener fails to load X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6dade54efb52d222cd45836f6ab14c5f9008cd0e;p=arcanist.git 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 --- diff --git a/scripts/arcanist.php b/scripts/arcanist.php index 4e0051b3..3c4936b8 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -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()); } } }