File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,19 @@ def inner_qmod(*args: Any, **kwargs: Any) -> Any:
5050 # prepend all the errors from `compare_qmods`, so that `actions/send_qmod_slack_notification` will have a simpler regex
5151 comparison_errors = _compare_qmods (qmods_before , qmods_after )
5252
53- if comparison_errors :
54- if error :
55- comparison_errors .insert (0 , error )
56- raise StrippedExceptionGroup (
57- "Main test + qmod compare errors" , comparison_errors
58- )
59- elif error :
60- raise strip_inners_from_exception (error )
53+ if comparison_errors or error :
54+ all_errors = []
55+ if error is not None :
56+ # put error from `func` first
57+ all_errors .append (error )
58+ all_errors .extend (comparison_errors )
59+
60+ if len (all_errors ) == 1 :
61+ raise strip_inners_from_exception (all_errors [0 ])
62+ else :
63+ raise StrippedExceptionGroup (
64+ "Main test + qmod compare errors" , all_errors
65+ )
6166
6267 return result
6368
You can’t perform that action at this time.
0 commit comments