Skip to content

debug mode #29

@alexandresalome

Description

@alexandresalome

What about adding a $debug parameter to Repository constructor that would affect the following behaviors:

  • add a public method Repository::isDebug to know in subclasses the policy to have (for parsing and sub-tasks)
  • when an error happens on git commands, return null if debug is disabled. Throws an exception if return code is not zero

In development, that would help you seeing edge cases. Recently, on Commit object, @lyrixx added a method getIncludingBranches. In it, if requested with a wrong object hash, execution fails. Debug mode would help here to see edge cases, why it's called with a wrong hash.

In production, it would silently crash, in a deathful logic pain.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions