diff --git a/xarray_schema/components.py b/xarray_schema/components.py index d212ddc..5aefb0e 100644 --- a/xarray_schema/components.py +++ b/xarray_schema/components.py @@ -345,7 +345,7 @@ def validate(self, attr: Any): ''' if self.type is not None: if not isinstance(attr, self.type): - SchemaError(f'attrs {attr} is not of type {self.type}') + raise SchemaError(f'attrs {attr} is not of type {self.type}') if self.value is not None: if self.value is not None and self.value != attr: