From f3fb4a00aaf697a4fe9c4d5d98d3a2e44375cef6 Mon Sep 17 00:00:00 2001
From: Mitchel Humpherys <mitchelh@codeaurora.org>
Date: Fri, 6 Nov 2015 12:27:56 -0800
Subject: [PATCH] lrdp-v2: debug_image_v2: Make NotImplementedErrors less noisy

Currently, if cache dumping is not supported on a given target, we put
up a traceback and error out.  The traceback is ugly and not helpful.
Catch the NotImplementedError and print a nicer message.

Change-Id: I07d1e3a5b56b809135d41919bcc992931764a0af
---
 linux-ramdump-parser-v2/debug_image_v2.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/linux-ramdump-parser-v2/debug_image_v2.py b/linux-ramdump-parser-v2/debug_image_v2.py
index 061f1fd..f63d37b 100644
--- a/linux-ramdump-parser-v2/debug_image_v2.py
+++ b/linux-ramdump-parser-v2/debug_image_v2.py
@@ -169,8 +169,11 @@ class DebugImage_v2():
         cache_type = lookup_cache_type(ramdump.hw_id, client_id, version)
         try:
             cache_type.parse(start, end, ramdump, outfile)
+        except NotImplementedError:
+            print_out_str('Cache dumping not supported for %s on this target'
+                          % client_name)
         except:
-            print_out_str('!!! Exception while running {0}'.format(client_name))
+            print_out_str('!!! Unhandled exception while running {0}'.format(client_name))
             print_out_exception()
         outfile.close()
 
-- 
GitLab