vertx-sync icon indicating copy to clipboard operation
vertx-sync copied to clipboard

when function throw a Exception, report errors

Open yuangu opened this issue 4 years ago • 0 comments

public class TestVerticle extends SyncVerticle {
    @Override
    public void start() throws Exception {
        super.start();

        vertx.eventBus().localConsumer("Test", fiberHandler(req -> {
            try {
                this.test(req);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }));
    }

    @Suspendable
    public void test(Message<Object> message) throws Exception{
        long tid = awaitEvent(h -> vertx.setTimer(1000, h));
        System.out.println("1111111111111");
        message.reply(new JsonObject().put("test", "test"));
    }
}

when this method with throws Exception. It's report errors。

co.paralleluniverse.fibers.SuspendExecution: Oops. Forgot to instrument a method. Run your program with -Dco.paralleluniverse.fibers.verifyInstrumentation=true to catch the culprit!

yuangu avatar Aug 26 '20 08:08 yuangu