mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
Add error handling
This commit is contained in:
parent
b906012175
commit
0356930a5c
2 changed files with 14 additions and 8 deletions
|
@ -89,10 +89,14 @@ namespace HISP
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start Web Server
|
// Start Web Server
|
||||||
cs = new ContentServer();
|
try{
|
||||||
string[] fileList = Directory.GetFiles(Path.Combine(baseDir, "client"), "*", SearchOption.AllDirectories);
|
cs = new ContentServer();
|
||||||
foreach (string file in fileList)
|
string[] fileList = Directory.GetFiles(Path.Combine(baseDir, "client"), "*", SearchOption.AllDirectories);
|
||||||
addToList(file);
|
foreach (string file in fileList)
|
||||||
|
addToList(file);
|
||||||
|
}catch(Exception as e){
|
||||||
|
MessageBox.Show("Web server failed to start: "+e.Message, "Error starting web server", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
IncrementProgress();
|
IncrementProgress();
|
||||||
|
|
||||||
|
@ -138,13 +142,15 @@ namespace HISP
|
||||||
|
|
||||||
Item.DoSpecialCases();
|
Item.DoSpecialCases();
|
||||||
IncrementProgress();
|
IncrementProgress();
|
||||||
|
try{
|
||||||
GameServer.StartServer();
|
GameServer.StartServer();
|
||||||
|
}catch(Exception as e){
|
||||||
|
MessageBox.Show("Horse Isle server failed to start: "+e.Message, "Error starting web server", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
IncrementProgress();
|
IncrementProgress();
|
||||||
|
|
||||||
lfrm.DialogResult = DialogResult.OK;
|
lfrm.DialogResult = DialogResult.OK;
|
||||||
startForm.Wait();
|
|
||||||
|
|
||||||
SystemTrayIcon stry = new SystemTrayIcon();
|
SystemTrayIcon stry = new SystemTrayIcon();
|
||||||
stry.ShowDialog();
|
stry.ShowDialog();
|
||||||
|
|
||||||
|
|
2
HorseIsleServer/N00BS/RegisterForm.Designer.cs
generated
2
HorseIsleServer/N00BS/RegisterForm.Designer.cs
generated
|
@ -207,7 +207,7 @@
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.MinimumSize = new System.Drawing.Size(365, 280);
|
this.MinimumSize = new System.Drawing.Size(365, 280);
|
||||||
this.Name = "RegisterForm";
|
this.Name = "RegisterForm";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation;
|
||||||
this.Text = "Create Account";
|
this.Text = "Create Account";
|
||||||
this.Load += new System.EventHandler(this.RegisterForm_Load);
|
this.Load += new System.EventHandler(this.RegisterForm_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue