Exits the Application.

    :param exit_code: Exit code.
    :type exit_code: int
502766
def exit(exit_code=0):
    

    for line in SESSION_FOOTER_TEXT:
        LOGGER.info(line)

    foundations.verbose.remove_logging_handler(RuntimeGlobals.logging_console_handler)

    RuntimeGlobals.application.exit(exit_code)
613787
def handle_command_exit_code(self, code):
        
        ca = self.call_args
        exc_class = get_exc_exit_code_would_raise(code, ca["ok_code"],
                ca["piped"])
        if exc_class:
            exc = exc_class(self.ran, self.process.stdout, self.process.stderr,
                    ca["truncate_exc"])
            raise exc
1068850
def exit(exit_code=0):
  
  """
  core.processExitHooks()

  if state.isExitHooked and not hasattr(sys, 'exitfunc'): # The function is called from the exit hook
    sys.stderr.flush()
    sys.stdout.flush()
    os._exit(exit_code) #pylint: disable=W0212

  sys.exit(exit_code)
1090066
def exit(self):
        ''''''
        self.output.write("Happy hacking!")
        self.output.nextLine()
        self.output.loseConnection()
537571
def _update_exit_code_from_stats(cls, statistics: Statistics,
                                     app: Application):
        ''''''
        for error_type in statistics.errors:
            exit_code = app.ERROR_CODE_MAP.get(error_type)
            if exit_code:
                app.update_exit_code(exit_code)
976349
def __exitfunction(self):
        '''
        
        '''
        if self._hook.exit_code is None and self._hook.exception is None:
            print("Check did not exit! You should call an exit code method.")
            sys.stdout.flush()
            os._exit(1)
        elif self._hook.exception:
            print("Check failed to run: %s, %s" %
                  (sys.last_type, traceback.format_tb(sys.last_traceback)))
            sys.stdout.flush()
            os._exit(2)
1170651
def _update_exit_code_from_error(self, error):
        '''
        '''
        for error_type, exit_code in self.ERROR_CODE_MAP.items():
            if isinstance(error, error_type):
                self.update_exit_code(exit_code)
                break
        else:
            self.update_exit_code(ExitStatus.generic_error)
937166
def _exit_with_output(content, exit_code=0):
    
    (sys.stdout if exit_code == 0 else sys.stderr).write(content + os.linesep)
    sys.exit(exit_code)
630041
def update_exit_code(self, code: int):
        '''
        '''
        if code:
            if self._exit_code:
                self._exit_code = min(self._exit_code, code)
            else:
                self._exit_code = code
822290
private void printHelpAndExit(int exitCode) {
    HelpFormatter hf = new HelpFormatter();

    hf.printHelp("gobblin-admin.sh <command> [options]", this.options);
    System.out.println("Valid commands:");
    for (String command : getCommandNames()) {
      System.out.println(command);
    }

    System.exit(exitCode);
  }
1036402
def exit():
        
        exit_msg = None
        try:
            loop = asyncio.get_event_loop()
            loop.stop()
        except Exception as e:
            logging.error('Could not stop loop: %s\nShutting down anyway..',
                          str(e))
1170752
def stop(self, exc=None, exit_code=None):
        '''
        '''
        return self._concurrency.stop(self, exc, exit_code)
890702
def Exit(msg, code=1):
    
    print >> sys.stderr, msg
    sys.exit(code)
283242
def handle_execution_engines(args):
    
    assert args
    print('\n'.join(cosmic_ray.plugins.execution_engine_names()))

    return ExitCode.OK
210931
def exit(self, status=EXIT_OK, message=None):
        
        if not self.parser:
            self.parser = argparse.ArgumentParser()
        if self.msg_on_error_only:
            # if msg_on_error_only is True
            if status != EXIT_OK:
                # if we have an error we'll exit with the message also.
                self.parser.exit(status, message)
            else:
                # else we'll exit with the status ongly
                self.parser.exit(status, None)
        else:
            # else if msg_on_error_only is not True
            # we'll exit with the status and the message
            self.parser.exit(status, message)
901879
public function execute($exitCode = false): int
	{
		$migrations = $this->getOutstanding();

		if(($count = count($migrations)) > 0)
		{
			$message = $count === 1 ? 'There is %s outstanding migration:' : 'There are %s outstanding migrations:';

			$this->write(vsprintf($message, ['<yellow>' . $count . '</yellow>']) . PHP_EOL);

			$this->outputMigrationList($migrations);
		}
		else
		{
			$this->write('<green>There are no outstanding migrations.</green>');
		}

		return ($exitCode && $count > 0) ? static::STATUS_ERROR : static::STATUS_SUCCESS;
	}
406349
protected final void bail(final ExitCode e) {
        if (e.isFailure()) {
            final StringBuilder bldr = new StringBuilder();
            bldr.append("\n");
            bldr.append(getApplicationShortName());
            bldr.append(" failed with error ");
            bldr.append(e);
            bldr.append(".");
            err.println(bldr.toString());
        }

        systemExit(e);
    }