Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: recipes.py

Issue 2798053003: introduce recipe_exception in result.proto (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « recipe_engine/unittests/run_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipes.py
diff --git a/recipes.py b/recipes.py
index 0626c1f356f2ef24611b9eab21b59192bc8d006c..8a0ad7417434c73140328d949465efe5221671cf 100755
--- a/recipes.py
+++ b/recipes.py
@@ -158,7 +158,14 @@ def new_handle_recipe_return(result, result_filename, stream_engine):
if result.HasField('failure'):
f = result.failure
if f.HasField('exception'):
- with stream_engine.make_step_stream('Uncaught Exception') as s:
+ with stream_engine.make_step_stream(
+ 'Uncaught Exception in recipe engine') as s:
+ s.add_step_text(f.human_reason)
+ with s.new_log_stream('exception') as l:
+ for line in f.exception.traceback:
+ l.write_line(line)
+ elif f.HasField('recipe_exception'):
+ with stream_engine.make_step_stream('Uncaught Exception in recipe') as s:
s.add_step_text(f.human_reason)
with s.new_log_stream('exception') as l:
for line in f.exception.traceback:
« no previous file with comments | « recipe_engine/unittests/run_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698