"""Exception Classes for Formulator"""# These classes are placed here so that they can be imported into TTW Python# scripts. To do so, add the following line to your Py script:# from Products.Formulator.Errors import ValidationError, FormValidationErrorfromProducts.PythonScripts.Utilityimportallow_classclassFormValidationError(Exception):def__init__(self,errors,result):Exception.__init__(self,"Form Validation Error")self.errors=errorsself.result=resultallow_class(FormValidationError)classValidationError(Exception):def__init__(self,error_key,field):Exception.__init__(self,error_key)self.error_key=error_keyself.field_id=field.idself.field=fieldself.error_text=field.get_error_message(error_key)allow_class(ValidationError)classFieldDisabledError(AttributeError):def__init__(self,error_key,field):AttributeError.__init__(self,error_key)self.field_id=field.idself.field=fieldallow_class(FieldDisabledError)