From a5463088fe57462bf681b648d21212808454fc2a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 9 Jan 2012 17:01:51 +0000 Subject: bitbake: Add BBHandledException exception class We have a problem knowing when to show the user debug information and when not to since the code has already shown the user suitable information about why a failure is occurring. This patch adds a bb.BBHandledException exception class which can be used to identify those exceptions which don't need further explanation to the user. This patch uses this class for the bb.providers exceptions and ensures the command handling code correctly filters the exceptions meaning that "bitbake invalid" now shows an simple error message and not a python traceback. [YOCTO #1141 partial] (Bitbake rev: eac9249b40ae1e3aa21e016010c862664e59a8d4) Signed-off-by: Richard Purdie --- bitbake/lib/bb/providers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/providers.py') diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index 4543447057..398c8ea115 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py @@ -28,10 +28,10 @@ import bb logger = logging.getLogger("BitBake.Provider") -class NoProvider(Exception): +class NoProvider(bb.BBHandledException): """Exception raised when no provider of a build dependency can be found""" -class NoRProvider(Exception): +class NoRProvider(bb.BBHandledException): """Exception raised when no provider of a runtime dependency can be found""" -- cgit v1.2.3-54-g00ecf