summaryrefslogtreecommitdiff
path: root/Source/Dafny/Reporting.cs
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-20 11:53:00 -0700
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-20 11:53:00 -0700
commit4b7ef1b817fe00bc32294b75797e7e264e2edbdd (patch)
treeafaa7e469ea904e7bc5b17efaeb19c36ed6657b4 /Source/Dafny/Reporting.cs
parent75e436019003604ea3118a13ccd9b6ea079c643f (diff)
Move indentation of error messages to the ConsoleErrorReporter
This indentation is just needed by CLI-based clients
Diffstat (limited to 'Source/Dafny/Reporting.cs')
-rw-r--r--Source/Dafny/Reporting.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Dafny/Reporting.cs b/Source/Dafny/Reporting.cs
index 63ec520a..4cfbf20e 100644
--- a/Source/Dafny/Reporting.cs
+++ b/Source/Dafny/Reporting.cs
@@ -143,7 +143,10 @@ namespace Microsoft.Dafny {
}
public override bool Message(MessageSource source, ErrorLevel level, IToken tok, string msg) {
- if (base.Message(source, level, tok, msg)) {
+ if (base.Message(source, level, tok, msg) && (DafnyOptions.O.PrintTooltips || level != ErrorLevel.Info)) {
+ // Extra indent added to make it easier to distinguish multiline error messages for clients that rely on the CLI
+ msg = msg.Replace(Environment.NewLine, Environment.NewLine + " ");
+
ConsoleColor previousColor = Console.ForegroundColor;
Console.ForegroundColor = ColorForLevel(level);
Console.WriteLine(ErrorToString(level, tok, msg));