Errors that can originate from problems in input arguments to reports. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method.
| 1052 | DateRange_validator = bv.Struct(DateRange) |
| 1053 | |
| 1054 | class DateRangeError(bb.Union): |
| 1055 | """ |
| 1056 | Errors that can originate from problems in input arguments to reports. |
| 1057 | |
| 1058 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 1059 | return true. To get the associated value of a tag (if one exists), use the |
| 1060 | corresponding ``get_*`` method. |
| 1061 | """ |
| 1062 | |
| 1063 | _catch_all = 'other' |
| 1064 | # Attribute is overwritten below the class definition |
| 1065 | other = None |
| 1066 | |
| 1067 | def is_other(self): |
| 1068 | """ |
| 1069 | Check if the union tag is ``other``. |
| 1070 | |
| 1071 | :rtype: bool |
| 1072 | """ |
| 1073 | return self._tag == 'other' |
| 1074 | |
| 1075 | def _process_custom_annotations(self, annotation_type, field_path, processor): |
| 1076 | super(DateRangeError, self)._process_custom_annotations(annotation_type, field_path, processor) |
| 1077 | |
| 1078 | DateRangeError_validator = bv.Union(DateRangeError) |
| 1079 |