Skip to content

log exception-capturing fixes - #225

Merged
mdboom merged 1 commit into
astropy:masterfrom
eteq:logging/exc-type
May 7, 2012
Merged

mdboom merged 1 commit into
astropy:masterfrom
eteq:logging/exc-type

Conversation

@eteq

@eteq eteq commented May 7, 2012

Copy link
Copy Markdown
Member

This makes two minor changes to how the astropy logger fomats exceptions:

  • It adds the name of the exception to the message (like the warnings)
  • it uses str(exc) to get the message itself, instead of exc.args[0]. The latter was failing for cases like raise ValueError because it has no args.

mdboom added a commit that referenced this pull request May 7, 2012
log exception-capturing fixes
@mdboom
mdboom merged commit 442ca46 into astropy:master May 7, 2012
@mdboom

mdboom commented May 7, 2012

Copy link
Copy Markdown
Contributor

Looks good to me. I accidentally pushed the wrong button and merged this (not enough caffeine yet, obviously). I'll sort it out if for some reason this turns out to not be quite right.

@eteq

eteq commented May 7, 2012

Copy link
Copy Markdown
Member Author

It was pretty simple, so I don't think there was much to go wrong (famous last words, though...) - many question: is @astrofrog fine with this change?

@astrofrog

Copy link
Copy Markdown
Member

Yep, looks fine to me!

keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
@eteq
eteq deleted the logging/exc-type branch May 3, 2015 17:16
astrofrog pushed a commit to astrofrog/astropy that referenced this pull request Jun 12, 2019
Limiting versions of setuptools and sphinx due to warnings that need 'fixin
jeffjennings pushed a commit to jeffjennings/astropy that referenced this pull request Jul 2, 2025
Fix astropy#194: Simplify role-changing machinery with json and js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants