lib: intro `Float.lerp` for simple linear interpolation
[nit.git] / lib / serialization.nit
index ae971c9..8a1d1ee 100644 (file)
@@ -15,7 +15,9 @@
 # limitations under the License.
 
 # Offers services to serialize a Nit objects to different persistent formats
-module serialization
+module serialization is
+       new_annotation auto_serializable
+end
 
 # Abstract serialization service to be sub-classed by specialized services.
 interface Serializer
@@ -65,7 +67,10 @@ interface Deserializer
 
        # Mainly generated method to return the next instance of the givent
        # class by name
-       fun deserialize_class(class_name: String): Object do abort
+       fun deserialize_class(class_name: String): Object do
+               print "Error: doesn't know how to deserialize class \"{class_name}\""
+               abort
+       end
 end
 
 # Instances of this class can be passed to `Serializer::serialize`