Message contains all semantic information necessary to easily
comprehend what caused the message to be logged. Each message can be turned
MessageContainer which contains the log level and can later be
consumed by a subclass of
Reporter. However, the error position is only
NOTE: you should not be persisting messages. Most messages take an implicit
Context and these contexts weigh in at about 4mb per instance, as such
persisting these will result in a memory leak.
Instead use the
persist method to create an instance that does not keep a
reference to these contexts.
The explanation should provide a detailed description of why the error occurred and use examples from the user's own code to illustrate how to avoid these errors.
The kind of the error message is something like "Syntax" or "Type Mismatch"
msg contains the diagnostic message e.g:
expected: String found: Int
This message will be placed underneath the position given by the enclosing
Context in messages is a large thing that we don't want
persisted. This method gets around that by duplicating the message
without the implicit context being passed along.