Example usage for org.springframework.boot.devtools.restart RestartLauncher getError

List of usage examples for org.springframework.boot.devtools.restart RestartLauncher getError

Introduction

In this page you can find the example usage for org.springframework.boot.devtools.restart RestartLauncher getError.

Prototype

Throwable getError() 

Source Link

Usage

From source file:org.springframework.boot.devtools.restart.Restarter.java

/**
 * Relaunch the application using the specified classloader.
 * @param classLoader the classloader to use
 * @return any exception that caused the launch to fail or {@code null}
 * @throws Exception in case of errors//from   w ww  .  j a  v  a  2s . c  om
 */
protected Throwable relaunch(ClassLoader classLoader) throws Exception {
    RestartLauncher launcher = new RestartLauncher(classLoader, this.mainClassName, this.args,
            this.exceptionHandler);
    launcher.start();
    launcher.join();
    return launcher.getError();
}