Skip to content

Commit

Permalink
Move use of console option WaitForEnter for consistency on all errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Jun 10, 2015
1 parent 881f25d commit bab9e45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions NAPS2.Console/AutomatedScanning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ public void Execute()
}

scannedImages = null;

if (options.WaitForEnter)
{
Console.ReadLine();
}
}

private void ImportImages()
Expand Down
6 changes: 5 additions & 1 deletion NAPS2.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ static void Main(string[] args)
}
catch (Exception ex)
{
KernelManager.Kernel.Get<ILogger>().FatalException("An error occurred that caused the console application to close.", ex);
KernelManager.Kernel.Get<ILogger>()
.FatalException("An error occurred that caused the console application to close.", ex);
System.Console.WriteLine(ConsoleResources.UnexpectedError);
}
finally
{
if (options.WaitForEnter)
{
System.Console.ReadLine();
Expand Down

0 comments on commit bab9e45

Please sign in to comment.