Logger.Fatal(exception.Message+". This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions");
System.Console.WriteLine("Press enter to exit...");
System.Console.ReadLine();
Environment.Exit(1);
Logger.Fatal(e.Message+". This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions");
Exit(ExitCodes.RecoverableFailure);
}
catch(Exceptione)
{
System.Console.WriteLine("");
System.Console.WriteLine("");
Logger.Fatal(e,"EPIC FAIL!");
System.Console.WriteLine("Press enter to exit...");
System.Console.ReadLine();
Environment.Exit(1);
Exit(ExitCodes.UnknownFailure);
}
Logger.Info("Exiting main.");
//Need this to terminate on mono (thanks nlog)
LogManager.Configuration=null;
Environment.Exit(0);
Exit(ExitCodes.Normal);
}
privatestaticvoidExit(ExitCodesexitCode)
{
LogManager.Shutdown();
if(exitCode!=ExitCodes.Normal)
{
System.Console.WriteLine("Press enter to exit...");
System.Threading.Thread.Sleep(1000);
// Please note that ReadLine silently succeeds if there is no console, KeyAvailable does not.