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.
# 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
lib/core/error.nit:19,2--30,20
redef var message is lazy do
var attribute = attribute
var found_type = if attribute != null then attribute.class_name else "null"
return "Deserialization Error: {
}Wrong type on `{receiver.class_name}::{attribute_name}` expected `{expected_type}`, got `{found_type}`"
end
lib/serialization/serialization_core.nit:199,2--205,4
redef var message is lazy do
return "Deserialization Error: Missing attribute `{receiver.class_name}::{attribute_name}`"
end
lib/serialization/serialization_core.nit:214,2--216,4