Skip to content

Improve advice on when to file bug #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions spin/__main__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import collections
import importlib
import importlib.util
import inspect
import os
import pathlib
import sys
import textwrap
import traceback
from typing import Union

import click
Expand Down Expand Up @@ -199,20 +199,26 @@ def group(ctx):

try:
group()
except Exception:
click.secho("\n" + traceback.format_exc(limit=-3), fg="red", file=sys.stderr)
except Exception as e:
click.secho(
textwrap.dedent(
f"""\
An internal error has occurred. Please file a bug report at

https://github.com/scientific-python/spin
{type(e).__name__}: {e}

including the above traceback and the following information:
This exception was raised from:

spin: {__version__}, package: {proj_name}
{inspect.trace()[-1].filename}

Aborting."""
If you suspect this is a bug in `spin`, please file a report at:

https://github.com/scientific-python/spin

including the above traceback and the following information:

spin: {__version__}, package: {proj_name}

Aborting."""
),
fg="red",
bold=True,
Expand Down
Loading