Reporting
rascal-0.40.16
typepal-0.14.8
Synopsis
How to format and report errors, warnings and info messages.
Description
Reporting may be done both in the Collector and the Solver. It uses values of the datatype FailMessage that can be created as follows:
FailMessage error(value src, str msg, value args...);
FailMessage warning(value src, str msg, value args...);
FailMessage info(value src, str msg, value args...);
Here,
srcis aTreeorlocthat is the subject of the report.msgis an informative string to be printed. It may contain insertion directives.argsare zero or more values to be inserted in the insertion directives inmsg.
The following insertion directives are supported:
%t: insert the type of the next element ofargs.%v: insert the value of the next element ofargs.%q: quote and insert the type or value of the next element ofargs.%%: insert the character%.