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

Errors while writing dropin.cache should show a less horrible error message #2644

Closed
twisted-trac opened this issue May 14, 2007 · 9 comments

Comments

@twisted-trac
Copy link

radix's avatar @radix reported
Trac ID trac#2644
Type enhancement
Created 2007-05-14 19:51:08Z

I suggest doing something like

log.err("warning: Couldn't write dropin.cache file because %s" % (e,))

instead of log.err()

Searchable metadata
trac-id__2644 2644
type__enhancement enhancement
reporter__radix radix
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__closed closed
resolution__duplicate duplicate
component__core core
keywords__ 
time__1179172268000000 1179172268000000
changetime__1235504242000000 1235504242000000
version__None None
owner__ 
cc__exarkun
@twisted-trac
Copy link
Author

exarkun's avatar @exarkun commented

Surely you mean log.err(None, "...")?

@twisted-trac
Copy link
Author

radix's avatar @radix set owner to @radix
@radix set status to assigned

lol.

I don't mean that, because that would cause the traceback to still be printed. That's what I'm trying to avoid.

@twisted-trac
Copy link
Author

exarkun's avatar @exarkun commented

I'm not sure it's an improvement to make a system misconfiguration less visible.

In any case, the message should not start with warning. The rest of the example sentence conveys just as much information without the prefix.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

I do believe that the most common error - that the dropin.cache file cannot be opened for writing - should be caught and logged as a warning rather than an error. I'll file a separate ticket for that.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

(by "logged as a warning" I mean "warnings.warn", not log.err("something misleading")).

@twisted-trac
Copy link
Author

radix's avatar @radix commented

Replying to glyph:

I do believe that the most common error - that the dropin.cache file cannot be opened for writing - should be caught and logged as a warning rather than an error. I'll file a separate ticket for that.

Does such a ticket exist yet? I can't find it. But actually, that particular case is all I was referring to when I made this ticket, so I don't think a separate ticket needs to be filed.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

Replying to radix:

Replying to glyph:

I do believe that the most common error - that the dropin.cache file cannot be opened for writing - should be caught and logged as a warning rather than an error.

Does such a ticket exist yet?

I believe #2409 is the ticket in question. Is this a duplicate now?

@twisted-trac
Copy link
Author

exarkun's avatar @exarkun set status to closed

Yes. Thanks for finding that.

@twisted-trac
Copy link
Author

Automation's avatar Automation removed owner

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

1 participant