Codota Logo
RpcException.getMessage
Code IndexAdd Codota to your IDE (free)

How to use
getMessage
method
in
com.alibaba.dubbo.rpc.RpcException

Best Java code snippets using com.alibaba.dubbo.rpc.RpcException.getMessage (Showing top 20 results out of 315)

  • Common ways to obtain RpcException
private void myMethod () {
RpcException r =
  • Codota IconString str;new RpcException(str)
  • Codota IconString str;Throwable cause;new RpcException(str, cause)
  • Codota IconThrowable cause;new RpcException(cause)
  • Smart code suggestions by Codota
}
origin: com.alibaba/dubbo

@Override
public Response toResponse(RpcException e) {
  // TODO do more sophisticated exception handling and output
  if (e.getCause() instanceof ConstraintViolationException) {
    return handleConstraintViolationException((ConstraintViolationException) e.getCause());
  }
  // we may want to avoid exposing the dubbo exception details to certain clients
  // TODO for now just do plain text output
  return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Internal server error: " + e.getMessage()).type(ContentType.TEXT_PLAIN_UTF_8).build();
}
origin: remoting/dubbox

public Response toResponse(RpcException e) {
  // TODO do more sophisticated exception handling and output
  if (e.getCause() instanceof ConstraintViolationException) {
    return handleConstraintViolationException((ConstraintViolationException) e.getCause());
  }
  // we may want to avoid exposing the dubbo exception details to certain clients
  // TODO for now just do plain text output
  return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Internal server error: " + e.getMessage()).type(ContentType.TEXT_PLAIN_UTF_8).build();
}
origin: remoting/dubbox

public Response toResponse(RpcException e) {
  // TODO do more sophisticated exception handling and output
  if (e.getCause() instanceof ConstraintViolationException) {
    return handleConstraintViolationException((ConstraintViolationException) e.getCause());
  }
  // we may want to avoid exposing the dubbo exception details to certain clients
  // TODO for now just do plain text output
  return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Internal server error: " + e.getMessage()).type(ContentType.TEXT_PLAIN_UTF_8).build();
}
origin: com.alibaba/dubbo-registry-redis

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: com.alibaba/dubbo

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: com.alibaba/dubbo-registry-redis

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: com.alibaba/dubbo-registry-redis

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: com.alibaba/dubbo

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: com.alibaba/dubbo

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: hutai123/dubbox

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: hutai123/dubbox

  logger.warn(exception.getMessage(), exception);
} else {
  throw exception;
origin: linux-china/dubbo3

@SuppressWarnings({ "unchecked", "rawtypes" })
public Result doInvoke(final Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
  checkInvokers(invokers, invocation);
  RpcContext.getContext().setInvokers((List)invokers);
  RpcException exception = null;
  Result result = null;
  for (Invoker<T> invoker: invokers) {
    try {
      result = invoker.invoke(invocation);
    } catch (RpcException e) {
      exception = e;
      logger.warn(e.getMessage(), e);
    } catch (Throwable e) {
      exception = new RpcException(e.getMessage(), e);
      logger.warn(e.getMessage(), e);
    }
  }
  if (exception != null) {
    throw exception;
  }
  return result;
}
origin: linux-china/dubbo3

@SuppressWarnings({ "unchecked", "rawtypes" })
public Result doInvoke(final Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
  checkInvokers(invokers, invocation);
  RpcContext.getContext().setInvokers((List)invokers);
  RpcException exception = null;
  Result result = null;
  for (Invoker<T> invoker: invokers) {
    try {
      result = invoker.invoke(invocation);
    } catch (RpcException e) {
      exception = e;
      logger.warn(e.getMessage(), e);
    } catch (Throwable e) {
      exception = new RpcException(e.getMessage(), e);
      logger.warn(e.getMessage(), e);
    }
  }
  if (exception != null) {
    throw exception;
  }
  return result;
}
origin: com.alibaba/dubbo

@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public Result doInvoke(final Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
  checkInvokers(invokers, invocation);
  RpcContext.getContext().setInvokers((List) invokers);
  RpcException exception = null;
  Result result = null;
  for (Invoker<T> invoker : invokers) {
    try {
      result = invoker.invoke(invocation);
    } catch (RpcException e) {
      exception = e;
      logger.warn(e.getMessage(), e);
    } catch (Throwable e) {
      exception = new RpcException(e.getMessage(), e);
      logger.warn(e.getMessage(), e);
    }
  }
  if (exception != null) {
    throw exception;
  }
  return result;
}
origin: com.alibaba/dubbo-cluster

@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public Result doInvoke(final Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
  checkInvokers(invokers, invocation);
  RpcContext.getContext().setInvokers((List) invokers);
  RpcException exception = null;
  Result result = null;
  for (Invoker<T> invoker : invokers) {
    try {
      result = invoker.invoke(invocation);
    } catch (RpcException e) {
      exception = e;
      logger.warn(e.getMessage(), e);
    } catch (Throwable e) {
      exception = new RpcException(e.getMessage(), e);
      logger.warn(e.getMessage(), e);
    }
  }
  if (exception != null) {
    throw exception;
  }
  return result;
}
origin: com.alibaba/dubbo

      + " on the consumer " + NetUtils.getLocalHost()
      + " using the dubbo version " + Version.getVersion() + ". Last error is: "
      + le.getMessage(), le);
+ " on the consumer " + NetUtils.getLocalHost() + " using the dubbo version "
+ Version.getVersion() + ". Last error is: "
+ (le != null ? le.getMessage() : ""), le != null && le.getCause() != null ? le.getCause() : le);
origin: com.alibaba/dubbo-cluster

      + " on the consumer " + NetUtils.getLocalHost()
      + " using the dubbo version " + Version.getVersion() + ". Last error is: "
      + le.getMessage(), le);
+ " on the consumer " + NetUtils.getLocalHost() + " using the dubbo version "
+ Version.getVersion() + ". Last error is: "
+ (le != null ? le.getMessage() : ""), le != null && le.getCause() != null ? le.getCause() : le);
origin: hutai123/dubbox

      + " on the consumer " + NetUtils.getLocalHost()
      + " using the dubbo version " + Version.getVersion() + ". Last error is: "
      + le.getMessage(), le);
+ " on the consumer " + NetUtils.getLocalHost() + " using the dubbo version "
+ Version.getVersion() + ". Last error is: "
+ (le != null ? le.getMessage() : ""), le != null && le.getCause() != null ? le.getCause() : le);
origin: wu191287278/spring-boot-starter-dubbo

public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
  URL url = invoker.getUrl();
  String spanName = url.getServiceInterface() + "." + invocation.getMethodName();
  Span newSpan = tracer.createSpan(spanName);
  try {
    dubboSpanInjector.inject(newSpan, RpcContext.getContext());
    newSpan.logEvent(Span.CLIENT_SEND);
    return invoker.invoke(invocation);
  } catch (RpcException e) {
    newSpan.tag("error", e.getMessage());
    throw e;
  } finally {
    if (tracer.isTracing()) {
      tracer.getCurrentSpan().logEvent(Span.CLIENT_RECV);
      tracer.close(tracer.getCurrentSpan());
    }
  }
}
origin: wu191287278/spring-boot-starter-dubbo

  span.tag("error", e.getMessage());
  throw e;
} finally {
com.alibaba.dubbo.rpcRpcExceptiongetMessage

Popular methods of RpcException

  • <init>
  • getCause
  • getCode
  • isBiz
  • setCode
  • printStackTrace

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now