File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 33import importlib .util
44import os
55import sys
6+ import textwrap
7+ import traceback
68
79import click
810
@@ -152,8 +154,25 @@ def group(ctx):
152154
153155 try :
154156 group ()
155- except Exception as e :
156- print (f"Error: { e } ; aborting." , file = sys .stderr )
157+ except Exception :
158+ click .secho ("\n " + traceback .format_exc (limit = - 3 ), fg = "red" , file = sys .stderr )
159+ click .secho (
160+ textwrap .dedent (
161+ f"""\
162+ An internal error has occurred. Please file a bug report at
163+
164+ https://github.com/scientific-python/spin
165+
166+ including the above traceback and the following information:
167+
168+ spin: { __version__ } , package: { proj_name }
169+
170+ Aborting."""
171+ ),
172+ fg = "red" ,
173+ bold = True ,
174+ file = sys .stderr ,
175+ )
157176 sys .exit (1 )
158177
159178
You can’t perform that action at this time.
0 commit comments