quixote/form widget.py,1.27,1.28

Greg Ward <gward-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]>
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Update of /home/cvs/quixote/form
In directory hewson:/tmp/cvs-serv15446

Modified Files:
	widget.py 
Log Message:
Add constructor and __str__() to FormValueError, so it has a 
well-defined interface.

Index: widget.py
===================================================================
RCS file: /home/cvs/quixote/form/widget.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- widget.py	14 Oct 2002 23:19:18 -0000	1.27
+++ widget.py	23 Oct 2002 19:58:58 -0000	1.28
@@ -16,6 +16,12 @@
 class FormValueError (Exception):
     """Raised whenever a widget has problems parsing its value."""
 
+    def __init__ (self, msg):
+        self.msg = msg
+
+    def __str__ (self):
+        return self.msg
+
 
 class Widget:
     """Abstract base class for web widgets.  The key elements
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.