Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Update error message
  • Loading branch information
Sparks29032 committed Feb 24, 2026
commit eab8da0d2175b08733b29fc4434dc89f988f3758
23 changes: 23 additions & 0 deletions news/error-message.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
8 changes: 7 additions & 1 deletion src/diffpy/morph/morphapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ def custom_error(self, msg):
Print a message incorporating 'msg' to stderr and exit. Does
not print usage.
"""
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
dis = (
"To except this error on Python, "
"please use 'except SystemExit:'."
)
self.exit(
2, "%s: error: %s\n%s\n" % (self.get_prog_name(), msg, dis)
)

parser = CustomParser(
usage="\n".join(
Expand Down
Loading