pock: Report `duplicate label' as an expected error.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 7 Feb 2019 11:27:20 +0000 (11:27 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 7 Feb 2019 11:43:18 +0000 (11:43 +0000)
It shouldn't result in a backtrace.

pock

diff --git a/pock b/pock
index 053cb36..3d9f66b 100644 (file)
--- a/pock
+++ b/pock
@@ -662,7 +662,7 @@ class PrimeProof (object):
 
     ## If the label is already taken then we have a problem.
     if step.label in me._steps:
-      raise ValueError('duplicate label `%s\'' % step.label)
+      raise ExpectedError('duplicate label `%s\'' % step.label)
 
     ## Store the proof step.
     me._pmap[step.p] = step.label