Created
May 13, 2015 19:50
-
-
Save anonymous/9d9e2288aa23688fc0f0 to your computer and use it in GitHub Desktop.
Process not dying sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.vertx.core.AbstractVerticle; | |
import io.vertx.core.Future; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
public class Server2 extends AbstractVerticle { | |
private static final Logger logger = LoggerFactory.getLogger(Server2.class); | |
@Override | |
public void start(final Future<Void> onStartup) { | |
try { | |
// let's pretend there's a problem | |
throw new RuntimeException("some problem"); | |
} catch (Exception e) { | |
logger.error("start - failed ex:", e); | |
onStartup.fail(e); | |
vertx.close(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment