Closed
Description
I have just spent an hour debugging my first progress code for clone_from.
I had a silly bug in my code, but because of this:
try:
handler(line)
except Exception:
I did not see any errors.
This code is in _dispatch_single_line or func handle_process_output in cmd.py
I do not see why you have this try handler at all.
Given that I have no logger file setup in my code that this experiment was conducted in
the logged error is silent.
I recommend that you remove the try/except altogether.
If you have a good reason to keep the try/except then use
log.exception( 'msg' )
that will include the traceback details.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
Byron commentedon May 24, 2016
I totally agree that catching all exceptions is bad practice, and am sorry to hear you spend so much time to trace that down.
The code I see in the latest version (please note it's always a good idea to state which version you are using ;)) is logging the exception accordingly.
Maybe the intention of this was to assure the line handler will never interrupt an ongoing fetch or pull. Changing this now would be a breaking change for buggy handler code ... but probably it's nothing to worry about anyway.
Thinking about it this way, I believe it's a good thing to change it.