use of io.vertx.up.exception._500UnexpectedRpcException in project vertx-zero by silentbalanceyh.
the class RpcRepdor method reply.
public void reply(final Future<Envelop> handler, final AsyncResult<IpcResponse> response) {
if (response.succeeded()) {
handler.complete(DataEncap.out(response.result()));
} else {
final Throwable ex = response.cause();
if (null != ex) {
final Envelop envelop = Envelop.failure(new _500UnexpectedRpcException(this.clazz, ex));
handler.complete(envelop);
// TODO: Debug Now, Remove In Future
ex.printStackTrace();
}
}
}
use of io.vertx.up.exception._500UnexpectedRpcException in project vertx-zero by silentbalanceyh.
the class RpcRepdor method replyJson.
public void replyJson(final Future<JsonObject> handler, final AsyncResult<IpcResponse> response) {
if (response.succeeded()) {
final Envelop json = DataEncap.out(response.result());
final JsonObject data = json.data();
LOGGER.info(Info.CLIENT_RESPONSE, data);
handler.complete(data);
} else {
final Throwable ex = response.cause();
if (null != ex) {
final Envelop envelop = Envelop.failure(new _500UnexpectedRpcException(this.clazz, ex));
handler.complete(new JsonObject(envelop.response()));
// TODO: Debug Now, Remove In Future
ex.printStackTrace();
}
}
}
Aggregations