Exemplo n.º 1
0
 /// <summary>
 /// Creates the connection to the database, and handles
 /// the excpetion (if any) that are thrown
 /// </summary>
 public void Connect()
 {
     try
     {
         Driver = new DatabaseDriver();
         Driver.Connect();
     }
     catch (Exception E)
     {
         Console.WriteLine("Database Connect Error: " +
             Environment.NewLine +
             E.Message +
             Environment.NewLine
         );
         Console.WriteLine("Forcing Server Shutdown...");
         Server.Shutdown();
         throw E;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates the connection to the database, and handles
 /// the excpetion (if any) that are thrown
 /// </summary>
 public void Connect()
 {
     try
     {
         Driver = new DatabaseDriver();
         Driver.Connect();
     }
     catch (Exception E)
     {
         Console.WriteLine("Database Connect Error: " +
                           Environment.NewLine +
                           E.Message +
                           Environment.NewLine
                           );
         Console.WriteLine("Forcing Server Shutdown...");
         Server.Shutdown();
         throw E;
     }
 }