Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Process not dying sample
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
You can’t perform that action at this time.