# This method should be redefined for each custom subclass of `Serializable`.
# All refinement should look for a precise `class_name` and call super
# on unsupported classes.
# This method should be redefined for each custom subclass of `Serializable`.
# All refinement should look for a precise `class_name` and call super
# on unsupported classes.
# Refinements to this method will be generated by the serialization phase.
# To avoid conflicts, there should not be any other refinements to this method.
# You can instead use `deserialize_class`.
# Refinements to this method will be generated by the serialization phase.
# To avoid conflicts, there should not be any other refinements to this method.
# You can instead use `deserialize_class`.
- protected fun deserialize_class_intern(class_name: String): Object do
- print "Error: doesn't know how to deserialize class \"{class_name}\""
- abort
+ protected fun deserialize_class_intern(class_name: String): nullable Object do
+ errors.add new Error("Deserialization Error: Doesn't know how to deserialize class \"{class_name}\"")
+ return null
# Create an instance of this class from the `deserializer`
#
# This constructor is refined by subclasses to correctly build their instances.
# Create an instance of this class from the `deserializer`
#
# This constructor is refined by subclasses to correctly build their instances.