summaryrefslogtreecommitdiff
path: root/Source/ModelViewer/Main.cs
diff options
context:
space:
mode:
authorGravatar stobies <unknown>2011-04-01 06:46:58 +0000
committerGravatar stobies <unknown>2011-04-01 06:46:58 +0000
commitdd270b5143e0f89abf8f5f80a747356b262b2f3a (patch)
treef54a09b55e5af77f8baebcb4afbab98ff8256c81 /Source/ModelViewer/Main.cs
parentcebff25640d79c8b1ec3809917bde431abafe3c3 (diff)
Model viewer:
Display message box for exception during execution Allow to pass options to Main window constructor
Diffstat (limited to 'Source/ModelViewer/Main.cs')
-rw-r--r--Source/ModelViewer/Main.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/ModelViewer/Main.cs b/Source/ModelViewer/Main.cs
index e1dfe528..13bb1b95 100644
--- a/Source/ModelViewer/Main.cs
+++ b/Source/ModelViewer/Main.cs
@@ -37,7 +37,7 @@ namespace Microsoft.Boogie.ModelViewer
yield return Base.Provider.Instance;
}
- public Main()
+ public Main(string[] args)
{
InitializeComponent();
@@ -51,7 +51,6 @@ namespace Microsoft.Boogie.ModelViewer
var debugBreak = false;
string filename = null;
- var args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++) {
var arg = args[i];
if (arg == "/break" || arg == "-break")
@@ -63,7 +62,9 @@ namespace Microsoft.Boogie.ModelViewer
if (debugBreak) {
System.Diagnostics.Debugger.Launch();
}
- if (filename == null) {
+
+ if (filename == null)
+ {
throw new Exception("error: usage: ModelViewer.exe MyProgram.model[:N]"); // (where does this exception go?)
}