Home / Class/ ApplicationFailedEvent Class — spring-boot Architecture

ApplicationFailedEvent Class — spring-boot Architecture

Architecture documentation for the ApplicationFailedEvent class in ApplicationFailedEvent.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationFailedEvent.java lines 31–68

@SuppressWarnings("serial")
public class ApplicationFailedEvent extends SpringApplicationEvent {

	private final @Nullable ConfigurableApplicationContext context;

	private final Throwable exception;

	/**
	 * Create a new {@link ApplicationFailedEvent} instance.
	 * @param application the current application
	 * @param args the arguments the application was running with
	 * @param context the context that was being created (maybe null)
	 * @param exception the exception that caused the error
	 */
	public ApplicationFailedEvent(SpringApplication application, String[] args,
			@Nullable ConfigurableApplicationContext context, Throwable exception) {
		super(application, args);
		this.context = context;
		this.exception = exception;
	}

	/**
	 * Return the application context.
	 * @return the context or {@code null}
	 */
	public @Nullable ConfigurableApplicationContext getApplicationContext() {
		return this.context;
	}

	/**
	 * Return the exception that caused the failure.
	 * @return the exception
	 */
	public Throwable getException() {
		return this.exception;
	}

}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free