}
else
{
try
{
CommandContainer exitCommand = registry.getCommand("exit", "");
// print a new line so we exit nicely
console.getShell().out().println();
exitCommand.getCommand().execute(
new AeshCommandInvocation(ShellImpl.this.console, ControlOperator.NONE, null));
}
catch (CommandNotFoundException | IOException e)
{
log.log(Level.WARNING, "Error while trying to run exit", e);