Commit d06eae47 authored by 董建华's avatar 董建华

调整日志

parent 8053ff05
Pipeline #958 failed with stages
...@@ -18,20 +18,20 @@ import java.io.IOException; ...@@ -18,20 +18,20 @@ import java.io.IOException;
*/ */
@Slf4j @Slf4j
public class ThrErrAsyncConnectionWarp implements Connection { public class ThrErrAsyncConnectionWarp implements Connection {
private final Connection connection ; private final Connection connection;
private final SentryExceptionHandler handler ; private final SentryExceptionHandler handler;
ThrErrAsyncConnectionWarp(Connection connection,SentryExceptionHandler handler){ ThrErrAsyncConnectionWarp(Connection connection, SentryExceptionHandler handler) {
this.connection = connection; this.connection = connection;
this.handler = handler; this.handler = handler;
} }
@Override @Override
public void send(Event event) throws ConnectionException { public void send(Event event) throws ConnectionException {
try { try {
log.info("要异常了");
connection.send(event); connection.send(event);
}catch (Exception e){ } catch (Exception e) {
log.warn("sentry调用异常将使用自定义的handler处理异常!", e);
handler.handle(e); handler.handle(e);
throw e; throw e;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment