This is an archive of the discontinued Mercurial Phabricator instance.

errors: use more specific errors in rebase extension
ClosedPublic

Authored by martinvonz on Jan 29 2021, 7:37 PM.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Jan 29 2021, 7:37 PM
pulkit added a subscriber: pulkit.Jan 31 2021, 1:20 PM

I think some of them should be StateError. To be honest, I am unable to draw a clear line between InputError and StateError. What do you think?

hgext/rebase.py
147

maybe StateError instead?

1464

Should be StateError instead?

1664

Should be StateError instead?

martinvonz marked 3 inline comments as done.Feb 3 2021, 12:59 PM
martinvonz updated this revision to Diff 25476.

I think some of them should be StateError. To be honest, I am unable to draw a clear line between InputError and StateError. What do you think?

I also don't really know the difference. It doesn't matter which I pick for Google's purposes anyway (we just want to filter out errors that are not caused by bugs). I doubt it would matter to others either. Therefore, I don't spend much time picking the right one and I'm happy to switch to whatever my reviewers prefer :)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.