Пример #1
0
 static void Main(string[] args) {
     try {
         Common.Flags = new Common.StartupFlags(args, Environment.Is64BitOperatingSystem);
         LoggingSetup.Setup("SteamHelper");
         using (var c = new ContainerSetup(() => RunInteractive.SteamApi)) {
             Environment.Exit(new CommandRunner(c.GetCommands()).RunCommandsAndLog(args));
         }
     } catch (SteamNotFoundException ex) {
         Error(ex, 4);
     } catch (SteamInitializationException ex) {
         Error(ex, 3);
     } catch (TimeoutException ex) {
         Error(ex, 9);
     } catch (OperationCanceledException ex) {
         Error(ex, 10);
     } catch (Exception ex) {
         Error(ex, 1);
     } catch {
         Error("Native code exception!", 2);
     }
 }
Пример #2
0
 static void Main(string[] args)
 {
     try {
         Common.Flags = new Common.StartupFlags(args, Environment.Is64BitOperatingSystem);
         LoggingSetup.Setup("SteamHelper");
         AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
         using (var c = new ContainerSetup(() => RunInteractive.SteamApi)) {
             Environment.Exit(new CommandRunner(c.GetCommands()).RunCommandsAndLog(args));
         }
     } catch (SteamNotFoundException ex) {
         Error(ex, 4);
     } catch (SteamInitializationException ex) {
         Error(ex, 3);
     } catch (TimeoutException ex) {
         Error(ex, 9);
     } catch (OperationCanceledException ex) {
         Error(ex, 10);
     } catch (Exception ex) {
         Error(ex, 1);
     } catch {
         Error("Native code exception!", 2);
     }
 }