From 085ea3f62f37539a279f7d4ade51208fcbe868b9 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Wed, 3 Sep 2008 18:32:49 +0000 Subject: 239: Added errors.ConversionError; started big clean up of how ValidationError is raised so it works well with multivalues --- ipalib/errors.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ipalib/errors.py') diff --git a/ipalib/errors.py b/ipalib/errors.py index d68bac40..8ecccf2b 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -119,6 +119,14 @@ class ValidationError(IPAError): IPAError.__init__(self, name, value, error) +class ConversionError(ValidationError): + def __init__(self, name, value, type_, position): + self.type = type_ + self.position = position + ValidationError.__init__(self, name, value, type_.conversion_error) + + + class NormalizationError(ValidationError): def __init__(self, name, value, type): self.type = type -- cgit