8000 except Exception in progress coding hiding bugs · Issue #435 · gitpython-developers/GitPython · GitHub
[go: up one dir, main page]

Skip to content
except Exception in progress coding hiding bugs #435
Closed
@barry-scott

Description

@barry-scott

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

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0