diff --git a/demo/agw/FoldPanelBar.py b/demo/agw/FoldPanelBar.py index bb7d5fd0..a7831a8b 100644 --- a/demo/agw/FoldPanelBar.py +++ b/demo/agw/FoldPanelBar.py @@ -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()) diff --git a/wx/lib/ogl/basic.py b/wx/lib/ogl/basic.py index 2ecbc5a5..5efd08cb 100644 --- a/wx/lib/ogl/basic.py +++ b/wx/lib/ogl/basic.py @@ -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