Sfoglia il codice sorgente

Clarify msgspec decode failure

nosoop 10 mesi fa
parent
commit
07399584fc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/smgdc/validate.py

+ 1 - 1
src/smgdc/validate.py

@@ -40,7 +40,7 @@ def convert_types(*types):
     def _dec_hook(type: typing.Type, obj: typing.Any) -> typing.Any:
         if type in types:
             return type(obj)
-        raise NotImplementedError
+        raise NotImplementedError(f"Decoding not implemented for type {type.__name__}")
 
     return _dec_hook