Patchwork error: make it clear that ProgrammingError is for mercurial developers

login
register
mail settings
Submitter Jun Wu
Date Dec. 12, 2016, 8:03 a.m.
Message ID <5efb46608ea75d45f1f4.1481529794@x1c>
Download mbox | patch
Permalink /patch/17890/
State Accepted
Headers show

Comments

Jun Wu - Dec. 12, 2016, 8:03 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1481529712 0
#      Mon Dec 12 08:01:52 2016 +0000
# Node ID 5efb46608ea75d45f1f4a73c33983c61177134b9
# Parent  3cec78a0556e35becc138801917b1d11a612ce60
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 5efb46608ea7
error: make it clear that ProgrammingError is for mercurial developers

The word "developer" could refer to users - people using hg are likely to be
developers. Add adjectives to make it refer to mercurial developers only.
Pierre-Yves David - Dec. 12, 2016, 7:58 p.m.
On 12/12/2016 09:03 AM, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1481529712 0
> #      Mon Dec 12 08:01:52 2016 +0000
> # Node ID 5efb46608ea75d45f1f4a73c33983c61177134b9
> # Parent  3cec78a0556e35becc138801917b1d11a612ce60
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r 5efb46608ea7
> error: make it clear that ProgrammingError is for mercurial developers
>
> The word "developer" could refer to users - people using hg are likely to be
> developers. Add adjectives to make it refer to mercurial developers only.

That one is pushed, thanks. There is probably a small cohort of 'assert' 
waiting to be converted into ProgrammingError.

> diff --git a/mercurial/error.py b/mercurial/error.py
> --- a/mercurial/error.py
> +++ b/mercurial/error.py
> @@ -170,5 +170,5 @@ class PushRaced(RuntimeError):
>
>  class ProgrammingError(RuntimeError):
> -    """Raised if a developer has made some mistake"""
> +    """Raised if a mercurial (core or extension) developer made a mistake"""
>
>  # bundle2 related errors
timeless - Dec. 18, 2016, 1:12 a.m.
Thanks

Patch

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -170,5 +170,5 @@  class PushRaced(RuntimeError):
 
 class ProgrammingError(RuntimeError):
-    """Raised if a developer has made some mistake"""
+    """Raised if a mercurial (core or extension) developer made a mistake"""
 
 # bundle2 related errors