public class DefaultExceptionConverter extends Object implements ExceptionConverter<Throwable>
Only very few exceptions carry sensitive data If discard all exception messages for these very few exceptions, it will cause difficult to locate problems so default to remain the messages, and log the exception if want to change these: 1. customize a new converter 2. disabled log for this class by log configuration
| Modifier and Type | Field and Description |
|---|---|
static int |
ORDER |
| Constructor and Description |
|---|
DefaultExceptionConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(Throwable throwable) |
InvocationException |
convert(Invocation invocation,
Throwable throwable,
javax.ws.rs.core.Response.StatusType genericStatus) |
int |
getOrder() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGenericCode, isClientpublic static final int ORDER
public int getOrder()
getOrder in interface org.apache.servicecomb.foundation.common.utils.SPIOrderpublic boolean canConvert(Throwable throwable)
canConvert in interface ExceptionConverter<Throwable>throwable - exception will be convertedpublic InvocationException convert(@Nullable Invocation invocation, Throwable throwable, javax.ws.rs.core.Response.StatusType genericStatus)
convert in interface ExceptionConverter<Throwable>invocation - related invocation, will be null only when failed to prepare invocationthrowable - exception will be convertedgenericStatus - if can not determine the status type, then use this input valueCopyright © 2017–2022 The Apache Software Foundation. All rights reserved.