Description
Pre 0.21.0, this would raise SomeError directly, now it raises msgspec.ValidationError with SomeError as a cause:
import msgspec
class SomeError(msgspec.ValidationError):
pass
class Foo:
pass
def dec_foo(tp, val):
raise SomeError()
try:
msgspec.convert("", type=Foo, dec_hook=dec_foo)
except Exception as exc:
print(type(exc))
I believe this was an unintended side-effect of #790.
I'm not sure if this is desirable or not. It is however a breaking change
Description
Pre
0.21.0, this would raiseSomeErrordirectly, now it raisesmsgspec.ValidationErrorwithSomeErroras acause:I believe this was an unintended side-effect of #790.
I'm not sure if this is desirable or not. It is however a breaking change