serialization :: serialization_core $ Error :: core_serialize_to
Actual serialization ofself
to serializer
serialization :: serialization_core $ Error :: from_deserializer
Create an instance of this class from thedeserializer
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePackserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
core :: Error :: defaultinit
core :: Object :: defaultinit
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraycore :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
Serializer::serialize
serialization :: AttributeError
Deserialization error related to an attribute ofreceiver
serialization :: AttributeMissingError
Missing attribute at deserializationserialization :: AttributeTypeError
Invalid dynamic type for a deserialized attributegithub :: GithubDeserializerErrors
An Error returned while deserializing objects from the API
# Standard class for error messages
class Error
# A short human-readable error message.
#
# This message is short and informative and could be displayed on the console, a dialog-box
# or written in a log file.
#
# Message should be explicative, autonomous and do not depend on contextual information.
#
# Eg. instead of "Fatal error: cannot open file",
# something like "File error, cannot open /some/path/document.ext, file not found." is preferred,
# where the message is informative as it, and the severity of the error is not assumed:
# while fatal for the library, it could be something benign for the program.
var message: String
# An original error that caused the creation of this error, if any.
#
# This is used to chain errors and track the implication of various sub-systems for a given error.
#
# When displaying an error the end user, causes can be recursively displayed.
var cause: nullable Error = null is writable
redef fun to_s do return message
end
lib/core/error.nit:17,1--40,3
redef class Error
super Serializable
redef init from_deserializer(v)
do
v.notify_of_creation self
var message = v.deserialize_attribute("message")
if not message isa String then message = ""
init message
var cause = v.deserialize_attribute("cause")
if cause isa nullable Error then self.cause = cause
end
redef fun core_serialize_to(v)
do
v.serialize_attribute("message", message)
v.serialize_attribute("cause", cause)
end
end
lib/serialization/serialization_core.nit:302,1--322,3