a.smali
.class public final Lj0/a;
.super Ljava/lang/Object;
.source "ExceptionParser.kt"
# static fields
.field public static final a:Lj0/a;
# direct methods
.method public static constructor <clinit>()V
.registers 1
new-instance v0, Lj0/a;
invoke-direct {v0}, Lj0/a;-><init>()V
sput-object v0, Lj0/a;->a:Lj0/a;
return-void
.end method
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static final a(Ljava/io/IOException;Lcom/shopee/hamster/base/apm/api/net/NetInfo;)V
.registers 3
.annotation runtime Lkotlin/jvm/JvmStatic;
.end annotation
const-string v0, "exception"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "netInfo"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {p1, v0}, Lcom/shopee/hamster/base/apm/api/net/NetInfo;->setErrorMsg(Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/io/IOException;->getCause()Ljava/lang/Throwable;
move-result-object v0
if-eqz v0, :cond_1c
invoke-virtual {v0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
move-result-object v0
goto :goto_1d
:cond_1c
const/4 v0, 0x0
:goto_1d
invoke-virtual {p1, v0}, Lcom/shopee/hamster/base/apm/api/net/NetInfo;->setErrorCause(Ljava/lang/String;)V
sget-object v0, Lj0/a;->a:Lj0/a;
invoke-virtual {v0, p0}, Lj0/a;->a(Ljava/lang/Exception;)I
move-result p0
invoke-virtual {p1, p0}, Lcom/shopee/hamster/base/apm/api/net/NetInfo;->setErrorCode(I)V
return-void
.end method
# virtual methods
.method public final a(Ljava/lang/Exception;)I
.registers 3
instance-of v0, p1, Ljava/net/BindException;
if-eqz v0, :cond_8
const/16 p1, 0x11
goto/16 :goto_6e
:cond_8
instance-of v0, p1, Ljava/net/ConnectException;
if-eqz v0, :cond_f
const/4 p1, 0x1
goto/16 :goto_6e
:cond_f
instance-of v0, p1, Ljava/net/NoRouteToHostException;
if-eqz v0, :cond_16
const/4 p1, 0x3
goto/16 :goto_6e
:cond_16
instance-of v0, p1, Ljava/net/PortUnreachableException;
if-eqz v0, :cond_1c
const/4 p1, 0x4
goto :goto_6e
:cond_1c
instance-of v0, p1, Ljava/net/SocketException;
if-eqz v0, :cond_22
const/4 p1, 0x6
goto :goto_6e
:cond_22
instance-of v0, p1, Ljava/net/HttpRetryException;
if-eqz v0, :cond_28
const/4 p1, 0x2
goto :goto_6e
:cond_28
instance-of v0, p1, Ljava/net/ProtocolException;
if-eqz v0, :cond_2e
const/4 p1, 0x5
goto :goto_6e
:cond_2e
instance-of v0, p1, Ljava/net/SocketTimeoutException;
if-eqz v0, :cond_34
const/4 p1, 0x7
goto :goto_6e
:cond_34
instance-of v0, p1, Ljava/net/UnknownHostException;
if-eqz v0, :cond_3b
const/16 p1, 0x8
goto :goto_6e
:cond_3b
instance-of v0, p1, Ljava/net/UnknownServiceException;
if-eqz v0, :cond_42
const/16 p1, 0x9
goto :goto_6e
:cond_42
instance-of v0, p1, Lokhttp3/internal/http2/ConnectionShutdownException;
if-eqz v0, :cond_49
const/16 p1, 0xe
goto :goto_6e
:cond_49
instance-of v0, p1, Lokhttp3/internal/http2/StreamResetException;
if-eqz v0, :cond_50
const/16 p1, 0xf
goto :goto_6e
:cond_50
instance-of v0, p1, Ljavax/net/ssl/SSLHandshakeException;
if-eqz v0, :cond_57
const/16 p1, 0xb
goto :goto_6e
:cond_57
instance-of v0, p1, Ljavax/net/ssl/SSLKeyException;
if-eqz v0, :cond_5e
const/16 p1, 0xd
goto :goto_6e
:cond_5e
instance-of v0, p1, Ljavax/net/ssl/SSLProtocolException;
if-eqz v0, :cond_65
const/16 p1, 0xc
goto :goto_6e
:cond_65
instance-of p1, p1, Ljavax/net/ssl/SSLException;
if-eqz p1, :cond_6c
const/16 p1, 0xa
goto :goto_6e
:cond_6c
const/16 p1, 0x10
:goto_6e
return p1
.end method
.method public final b(Ljava/lang/Exception;)Z
.registers 3
const-string v0, "e"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
instance-of v0, p1, Ljava/net/ConnectException;
if-nez v0, :cond_20
instance-of v0, p1, Ljava/net/NoRouteToHostException;
if-nez v0, :cond_20
instance-of v0, p1, Ljava/net/SocketException;
if-nez v0, :cond_20
instance-of v0, p1, Ljava/net/SocketTimeoutException;
if-nez v0, :cond_20
instance-of v0, p1, Ljava/net/UnknownHostException;
if-nez v0, :cond_20
instance-of p1, p1, Ljavax/net/ssl/SSLException;
if-eqz p1, :cond_1e
goto :goto_20
:cond_1e
const/4 p1, 0x0
goto :goto_21
:cond_20
:goto_20
const/4 p1, 0x1
:goto_21
return p1
.end method