Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Verifpal
Verifpal for Visual Studio Code
Commits
35049cd8
Unverified
Commit
35049cd8
authored
Apr 27, 2020
by
Nadim Kobeissi
💾
Browse files
Handle invalid models and show errors when attempting to analyze/visualize.
parent
6c775f82
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/AnalysisProvider.ts
View file @
35049cd8
...
...
@@ -76,7 +76,7 @@ export default class AnalysisProvider {
static
verify
(
editor
:
vscode
.
TextEditor
)
{
if
(
analysisActive
)
{
vscode
.
window
.
show
Information
Message
(
"
Verifpal: Analysis is already running.
"
);
vscode
.
window
.
show
Error
Message
(
"
Verifpal: Analysis is already running.
"
);
return
;
}
let
fileContents
=
editor
.
document
.
getText
();
...
...
@@ -127,6 +127,9 @@ export default class AnalysisProvider {
}
});
}
}).
catch
((
err
)
=>
{
analysisActive
=
false
;
vscode
.
window
.
showErrorMessage
(
"
Verifpal: Your model is invalid and cannot be analyzed or visualized. Check for syntax errors.
"
);
});
}
}
\ No newline at end of file
src/DiagramProvider.ts
View file @
35049cd8
...
...
@@ -43,6 +43,8 @@ export default class DiagramProvider {
diagramHtml
=
diagramHtml
.
replace
(
"
$$MODELNAME$$
"
,
modelName
);
diagramHtml
=
diagramHtml
.
replace
(
"
$$DIAGRAM$$
"
,
result
);
this
.
webviewPanel
.
webview
.
html
=
diagramHtml
;
}).
catch
((
err
)
=>
{
vscode
.
window
.
showErrorMessage
(
"
Verifpal: Your model is invalid and cannot be analyzed or visualized. Check for syntax errors.
"
);
});
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment