Skip to content
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

Logged exceptions could contain much more useful information #3911

Closed
knservis opened this issue Aug 6, 2020 · 2 comments
Closed

Logged exceptions could contain much more useful information #3911

knservis opened this issue Aug 6, 2020 · 2 comments

Comments

@knservis
Copy link

knservis commented Aug 6, 2020

Motivation

Improve logged exceptions.

Modification

Where the logged messages is uninformative, using logger.exception could improve troubleshooting, for instance here:

rucio/bin/rucio

Line 227 in 7820df4

logger.error(error)

and here:

rucio/bin/rucio

Line 2371 in 7820df4

logger.error("Strange error: {0}".format(error))

In the last instance the assessment 'Strange error' probably does not add any value or helps the log reader diagnose the issue. I suggest clarifying the message.

@bari12
Copy link
Member

bari12 commented Aug 6, 2020

I agree, that would be helpful. Esepcially in the "strange error" case which was always quite unhelpful.

@bari12
Copy link
Member

bari12 commented Jun 3, 2021

Remove try/except block for the strange (unexpected) error and let the stack trace happen.

@bari12 bari12 assigned rcarpa and unassigned mlassnig Jun 3, 2021
@bari12 bari12 closed this as completed in 9c5494a Jul 30, 2021
bari12 added a commit that referenced this issue Jul 30, 2021
…or_try_except

Clients: remove un-needed try-except blocks. Closes #3911
bari12 pushed a commit that referenced this issue Jul 30, 2021
All rucio commands are wrapped by an exception_handler functions.
As a consequence, the removed excepts should not occur in any normal
program flow or on expected error. It's more beneficial to have a full
trace in such cases. So let the exception propagate.
@bari12 bari12 modified the milestones: 1.23.16-clients, 1.26.1-clients Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants