Search in sources :

Example 1 with io.vertx.up.exception._500EntityCastException

use of io.vertx.up.exception._500EntityCastException in project vertx-zero by silentbalanceyh.

the class BaseAim method success.

protected Envelop success(final String address, final AsyncResult<Message<Envelop>> handler) {
    Envelop envelop;
    try {
        final Message<Envelop> message = handler.result();
        envelop = message.body();
    } catch (final Throwable ex) {
        final WebException error = new _500EntityCastException(this.getClass(), address, ex.getMessage());
        envelop = Envelop.failure(error);
    }
    return envelop;
}
Also used : io.vertx.up.exception._500EntityCastException(io.vertx.up.exception._500EntityCastException) WebException(io.vertx.up.exception.WebException) Envelop(io.vertx.up.atom.Envelop)

Aggregations

Envelop (io.vertx.up.atom.Envelop)1 WebException (io.vertx.up.exception.WebException)1 io.vertx.up.exception._500EntityCastException (io.vertx.up.exception._500EntityCastException)1