static void Main(string[] args) { CommandConsoleSB commandConsole = null; try { commandConsole = new CommandConsoleSB(); commandConsole.ExecutionCommand(); } catch (Exception exception) { Log.Error(exception.ToString); } finally { if (commandConsole != null) { commandConsole.StopConsole(); } else { Environment.Exit(0); } } }
/// <summary> /// Генерация случайных книг /// </summary> private void GenerationBook() { try { TryGenerationBook(); } catch (Exception exception) { if (!(exception is RabbitmqException)) { Log.Error(exception.ToString); } CommandConsole.StopConsole(); } }