Merge pull request #756 from jwilk-forks/string-exceptions

Don't use string exceptions
This commit is contained in:
Robin Dunn
2018-02-19 16:52:41 -08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -501,7 +501,7 @@ class Extended(wx.Frame):
style.SetCaptionStyle(fpb.CAPTIONBAR_FILLED_RECTANGLE)
else:
raise "ERROR: Undefined Style Selected For CaptionBar: " + repr(eventid)
raise ValueError("Undefined Style Selected For CaptionBar: " + repr(eventid))
col1 = wx.Colour(self._rslider1.GetValue(), self._gslider1.GetValue(),
self._bslider1.GetValue())

View File

@@ -2051,7 +2051,7 @@ class Shape(ShapeEvtHandler):
shoulder1[1] = neck[1] - totalBranchLength / 2.0
shoulder2[1] = neck[1] + totalBranchLength / 2.0
else:
raise "Unrecognised attachment point in GetBranchingAttachmentInfo"
raise ValueError("Unrecognised attachment point in GetBranchingAttachmentInfo")
return root, neck, shoulder1, shoulder2
def GetBranchingAttachmentPoint(self, attachment, n):
@@ -2093,7 +2093,7 @@ class Shape(ShapeEvtHandler):
stemPt[0] = neck[0]
stemPt[1] = pt[1]
else:
raise "Unrecognised attachment point in GetBranchingAttachmentPoint"
raise ValueError("Unrecognised attachment point in GetBranchingAttachmentPoint")
return pt, stemPt
@@ -2140,7 +2140,7 @@ class Shape(ShapeEvtHandler):
root[0] = self.GetX() - width / 2.0
root[1] = self.GetY()
else:
raise "Unrecognised attachment point in GetBranchingAttachmentRoot"
raise ValueError("Unrecognised attachment point in GetBranchingAttachmentRoot")
return root