Home / Function/ runAndHandleErrors() — spring-boot Function Reference

runAndHandleErrors() — spring-boot Function Reference

Architecture documentation for the runAndHandleErrors() function in CommandRunner.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 6 called by 2

Entity Profile

Dependency Diagram

graph TD
  146781aa_36d9_10e6_eb21_8c24c5539805["runAndHandleErrors()"]
  a2c16583_5a36_a7dd_517c_6810d69952d6["main()"]
  a2c16583_5a36_a7dd_517c_6810d69952d6 -->|calls| 146781aa_36d9_10e6_eb21_8c24c5539805
  214c962d_8073_5c5a_1fa9_47c3dea3d1f4["runInputLoop()"]
  214c962d_8073_5c5a_1fa9_47c3dea3d1f4 -->|calls| 146781aa_36d9_10e6_eb21_8c24c5539805
  ea4adc22_bd65_0ef7_c075_2cc832106c60["removeDebugFlags()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| ea4adc22_bd65_0ef7_c075_2cc832106c60
  9d0a96cd_7225_a1a4_7d58_1b34cca7b97f["run()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| 9d0a96cd_7225_a1a4_7d58_1b34cca7b97f
  ba860940_60f9_c113_477e_9c3f507b4a14["isHangup()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| ba860940_60f9_c113_477e_9c3f507b4a14
  45ee0d0c_0d86_088d_e4cb_8cc8fed75843["getCode()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| 45ee0d0c_0d86_088d_e4cb_8cc8fed75843
  498377fc_fdeb_8d62_f0a1_f867ac7a7540["showUsage()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| 498377fc_fdeb_8d62_f0a1_f867ac7a7540
  5be2ce5f_cd3e_d3cc_bcc3_09f53ee247d5["handleError()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| 5be2ce5f_cd3e_d3cc_bcc3_09f53ee247d5
  style 146781aa_36d9_10e6_eb21_8c24c5539805 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java lines 166–187

	public int runAndHandleErrors(String... args) {
		String[] argsWithoutDebugFlags = removeDebugFlags(args);
		boolean debug = argsWithoutDebugFlags.length != args.length;
		if (debug) {
			System.setProperty("debug", "true");
		}
		try {
			ExitStatus result = run(argsWithoutDebugFlags);
			// The caller will hang up if it gets a non-zero status
			if (result != null && result.isHangup()) {
				return (result.getCode() > 0) ? result.getCode() : 0;
			}
			return 0;
		}
		catch (NoArgumentsException ex) {
			showUsage();
			return 1;
		}
		catch (Exception ex) {
			return handleError(debug, ex);
		}
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does runAndHandleErrors() do?
runAndHandleErrors() is a function in the spring-boot codebase.
What does runAndHandleErrors() call?
runAndHandleErrors() calls 6 function(s): getCode, handleError, isHangup, removeDebugFlags, run, showUsage.
What calls runAndHandleErrors()?
runAndHandleErrors() is called by 2 function(s): main, runInputLoop.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free