summaryrefslogtreecommitdiff
path: root/Util
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2012-08-21 00:24:08 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2012-08-21 00:24:08 -0700
commit1ac82df441e621fce2f38d53b5d17c69650d7358 (patch)
treea882d519a00f2d7cef05756598257867f7523e41 /Util
parent61ca25219a71a22430b3f7a5071f8655cbf75cb1 (diff)
Dafny and Boogie: get rid of 'static' fields in parser
Diffstat (limited to 'Util')
-rw-r--r--Util/VS2010/DafnyExtension/DafnyExtension/ProgressMargin.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/Util/VS2010/DafnyExtension/DafnyExtension/ProgressMargin.cs b/Util/VS2010/DafnyExtension/DafnyExtension/ProgressMargin.cs
index 16ed18f4..5fa7d91c 100644
--- a/Util/VS2010/DafnyExtension/DafnyExtension/ProgressMargin.cs
+++ b/Util/VS2010/DafnyExtension/DafnyExtension/ProgressMargin.cs
@@ -191,17 +191,22 @@ namespace DafnyLanguage
// Run the verifier
var newErrors = new List<DafnyError>();
- bool success = DafnyDriver.Verify(program, errorInfo => {
- newErrors.Add(new DafnyError(errorInfo.Tok.line - 1, errorInfo.Tok.col - 1, ErrorCategory.VerificationError, errorInfo.Msg));
- foreach (var aux in errorInfo.Aux) {
- newErrors.Add(new DafnyError(aux.Tok.line - 1, aux.Tok.col - 1, ErrorCategory.AuxInformation, aux.Msg));
+ try {
+ bool success = DafnyDriver.Verify(program, errorInfo => {
+ newErrors.Add(new DafnyError(errorInfo.Tok.line - 1, errorInfo.Tok.col - 1, ErrorCategory.VerificationError, errorInfo.Msg));
+ foreach (var aux in errorInfo.Aux) {
+ newErrors.Add(new DafnyError(aux.Tok.line - 1, aux.Tok.col - 1, ErrorCategory.AuxInformation, aux.Msg));
+ }
+ });
+ if (!success) {
+ newErrors.Clear();
+ newErrors.Add(new DafnyError(0, 0, ErrorCategory.InternalError, "verification process error"));
}
- });
- errorListHolder.PopulateErrorList(newErrors, true, snapshot);
- if (!success) {
+ } catch (Exception e) {
newErrors.Clear();
- newErrors.Add(new DafnyError(0, 0, ErrorCategory.InternalError, "verification process error"));
+ newErrors.Add(new DafnyError(0, 0, ErrorCategory.InternalError, "verification process error: " + e.Message));
}
+ errorListHolder.PopulateErrorList(newErrors, true, snapshot);
lock (this) {
bufferChangesPreVerificationStart.Clear();