apkfuckery/com.discord/smali_classes2/rx/exceptions/CompositeException.smali

636 lines
15 KiB
Smali
Raw Normal View History

2020-07-08 16:44:49 +00:00
.class public final Lrx/exceptions/CompositeException;
2020-05-17 12:40:10 +00:00
.super Ljava/lang/RuntimeException;
.source "CompositeException.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
2020-07-08 16:44:49 +00:00
Lrx/exceptions/CompositeException$a;,
Lrx/exceptions/CompositeException$d;,
Lrx/exceptions/CompositeException$c;,
Lrx/exceptions/CompositeException$b;
2020-05-17 12:40:10 +00:00
}
.end annotation
# static fields
.field public static final serialVersionUID:J = 0x29ffcc6947b49592L
# instance fields
.field public cause:Ljava/lang/Throwable;
.field public final exceptions:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/lang/Throwable;",
">;"
}
.end annotation
.end field
.field public final message:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/util/Collection;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"+",
"Ljava/lang/Throwable;",
">;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/RuntimeException;-><init>()V
new-instance v0, Ljava/util/LinkedHashSet;
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
if-eqz p1, :cond_2
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_3
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Throwable;
2020-07-08 16:44:49 +00:00
instance-of v3, v2, Lrx/exceptions/CompositeException;
2020-05-17 12:40:10 +00:00
if-eqz v3, :cond_0
2020-07-08 16:44:49 +00:00
check-cast v2, Lrx/exceptions/CompositeException;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v2, v2, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v2}, Ljava/util/AbstractCollection;->addAll(Ljava/util/Collection;)Z
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_0
if-eqz v2, :cond_1
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_1
new-instance v2, Ljava/lang/NullPointerException;
invoke-direct {v2}, Ljava/lang/NullPointerException;-><init>()V
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_2
new-instance p1, Ljava/lang/NullPointerException;
invoke-direct {p1}, Ljava/lang/NullPointerException;-><init>()V
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
:cond_3
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
2020-05-17 12:40:10 +00:00
invoke-static {v1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object p1
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " exceptions occurred. "
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lrx/exceptions/CompositeException;->message:Ljava/lang/String;
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public varargs constructor <init>([Ljava/lang/Throwable;)V
.locals 6
invoke-direct {p0}, Ljava/lang/RuntimeException;-><init>()V
new-instance v0, Ljava/util/LinkedHashSet;
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
array-length v2, p1
const/4 v3, 0x0
:goto_0
2020-07-08 16:44:49 +00:00
if-ge v3, v2, :cond_2
2020-05-17 12:40:10 +00:00
aget-object v4, p1, v3
2020-07-08 16:44:49 +00:00
instance-of v5, v4, Lrx/exceptions/CompositeException;
2020-05-17 12:40:10 +00:00
if-eqz v5, :cond_0
2020-07-08 16:44:49 +00:00
check-cast v4, Lrx/exceptions/CompositeException;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object v4, v4, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v4}, Ljava/util/AbstractCollection;->addAll(Ljava/util/Collection;)Z
2020-05-17 12:40:10 +00:00
goto :goto_1
:cond_0
if-eqz v4, :cond_1
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v4}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
goto :goto_1
:cond_1
new-instance v4, Ljava/lang/NullPointerException;
invoke-direct {v4}, Ljava/lang/NullPointerException;-><init>()V
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v4}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
:goto_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_2
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
2020-05-17 12:40:10 +00:00
invoke-static {v1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object p1
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " exceptions occurred. "
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
2020-07-08 16:44:49 +00:00
iput-object p1, p0, Lrx/exceptions/CompositeException;->message:Ljava/lang/String;
2020-05-17 12:40:10 +00:00
return-void
.end method
# virtual methods
2020-07-08 16:44:49 +00:00
.method public final a(Ljava/lang/StringBuilder;Ljava/lang/Throwable;Ljava/lang/String;)V
.locals 5
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 p3, 0xa
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/Throwable;->getStackTrace()[Ljava/lang/StackTraceElement;
move-result-object v0
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
aget-object v3, v0, v2
const-string v4, "\t\tat "
invoke-virtual {p1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
invoke-virtual {p2}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object p3
if-eqz p3, :cond_1
const-string p3, "\tCaused by: "
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object p2
const-string p3, ""
invoke-virtual {p0, p1, p2, p3}, Lrx/exceptions/CompositeException;->a(Ljava/lang/StringBuilder;Ljava/lang/Throwable;Ljava/lang/String;)V
:cond_1
return-void
2020-05-17 12:40:10 +00:00
.end method
2020-07-08 16:44:49 +00:00
.method public final b(Lrx/exceptions/CompositeException$b;)V
2020-05-17 12:40:10 +00:00
.locals 7
new-instance v0, Ljava/lang/StringBuilder;
const/16 v1, 0x80
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0xa
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/RuntimeException;->getStackTrace()[Ljava/lang/StackTraceElement;
move-result-object v2
array-length v3, v2
const/4 v4, 0x0
:goto_0
if-ge v4, v3, :cond_0
aget-object v5, v2, v4
const-string v6, "\tat "
invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
add-int/lit8 v4, v4, 0x1
goto :goto_0
:cond_0
2020-07-08 16:44:49 +00:00
iget-object v1, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
const/4 v2, 0x1
const/4 v3, 0x1
:goto_1
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/Throwable;
const-string v5, " ComposedException "
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v5, " :\n"
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v5, "\t"
2020-07-08 16:44:49 +00:00
invoke-virtual {p0, v0, v4, v5}, Lrx/exceptions/CompositeException;->a(Ljava/lang/StringBuilder;Ljava/lang/Throwable;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
add-int/2addr v3, v2
goto :goto_1
:cond_1
2020-07-08 16:44:49 +00:00
invoke-virtual {p1}, Lrx/exceptions/CompositeException$b;->a()Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
move-result-object v1
monitor-enter v1
:try_start_0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
2020-07-08 16:44:49 +00:00
invoke-virtual {p1, v0}, Lrx/exceptions/CompositeException$b;->b(Ljava/lang/Object;)V
2020-05-17 12:40:10 +00:00
monitor-exit v1
return-void
:catchall_0
move-exception p1
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method
.method public declared-synchronized getCause()Ljava/lang/Throwable;
.locals 8
monitor-enter p0
:try_start_0
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lrx/exceptions/CompositeException;->cause:Ljava/lang/Throwable;
2020-05-17 12:40:10 +00:00
if-nez v0, :cond_b
2020-07-08 16:44:49 +00:00
new-instance v0, Lrx/exceptions/CompositeException$a;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {v0}, Lrx/exceptions/CompositeException$a;-><init>()V
2020-05-17 12:40:10 +00:00
new-instance v1, Ljava/util/HashSet;
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
2020-07-08 16:44:49 +00:00
iget-object v2, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List;
2020-05-17 12:40:10 +00:00
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
move-object v3, v0
:cond_0
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_a
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/Throwable;
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v4}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
move-result v5
if-eqz v5, :cond_1
goto :goto_0
:cond_1
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v4}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
new-instance v5, Ljava/util/ArrayList;
invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V
invoke-virtual {v4}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v6
if-eqz v6, :cond_4
if-ne v6, v4, :cond_2
goto :goto_2
:cond_2
:goto_1
2020-07-08 16:44:49 +00:00
invoke-virtual {v5, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
invoke-virtual {v6}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v7
if-eqz v7, :cond_4
if-ne v7, v6, :cond_3
goto :goto_2
:cond_3
invoke-virtual {v6}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v6
goto :goto_1
:cond_4
:goto_2
2020-07-08 16:44:49 +00:00
invoke-virtual {v5}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
2020-05-17 12:40:10 +00:00
move-result-object v5
:goto_3
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
move-result v6
if-eqz v6, :cond_6
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/lang/Throwable;
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v6}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
move-result v7
if-eqz v7, :cond_5
new-instance v4, Ljava/lang/RuntimeException;
const-string v6, "Duplicate found in causal chain so cropping to prevent loop ..."
invoke-direct {v4, v6}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
goto :goto_3
:cond_5
2020-07-08 16:44:49 +00:00
invoke-virtual {v1, v6}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
goto :goto_3
:cond_6
:try_start_1
invoke-virtual {v3, v4}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
:try_start_2
invoke-virtual {v3}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v4
if-eqz v4, :cond_0
if-ne v4, v3, :cond_7
goto :goto_0
:cond_7
:goto_4
invoke-virtual {v4}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v3
if-eqz v3, :cond_9
if-ne v3, v4, :cond_8
goto :goto_5
:cond_8
invoke-virtual {v4}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object v4
goto :goto_4
:cond_9
:goto_5
move-object v3, v4
goto :goto_0
:cond_a
2020-07-08 16:44:49 +00:00
iput-object v0, p0, Lrx/exceptions/CompositeException;->cause:Ljava/lang/Throwable;
2020-05-17 12:40:10 +00:00
:cond_b
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lrx/exceptions/CompositeException;->cause:Ljava/lang/Throwable;
2020-05-17 12:40:10 +00:00
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-object v0
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public getMessage()Ljava/lang/String;
.locals 1
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lrx/exceptions/CompositeException;->message:Ljava/lang/String;
2020-05-17 12:40:10 +00:00
return-object v0
.end method
.method public printStackTrace()V
.locals 1
sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;
2020-07-08 16:44:49 +00:00
invoke-virtual {p0, v0}, Lrx/exceptions/CompositeException;->printStackTrace(Ljava/io/PrintStream;)V
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public printStackTrace(Ljava/io/PrintStream;)V
.locals 1
2020-07-08 16:44:49 +00:00
new-instance v0, Lrx/exceptions/CompositeException$c;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {v0, p1}, Lrx/exceptions/CompositeException$c;-><init>(Ljava/io/PrintStream;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p0, v0}, Lrx/exceptions/CompositeException;->b(Lrx/exceptions/CompositeException$b;)V
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public printStackTrace(Ljava/io/PrintWriter;)V
.locals 1
2020-07-08 16:44:49 +00:00
new-instance v0, Lrx/exceptions/CompositeException$d;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {v0, p1}, Lrx/exceptions/CompositeException$d;-><init>(Ljava/io/PrintWriter;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p0, v0}, Lrx/exceptions/CompositeException;->b(Lrx/exceptions/CompositeException$b;)V
2020-05-17 12:40:10 +00:00
return-void
.end method