.class public final Lrx/a/a; .super Ljava/lang/RuntimeException; .source "CompositeException.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lrx/a/a$a;, Lrx/a/a$d;, Lrx/a/a$c;, Lrx/a/a$b; } .end annotation # static fields .field private static final serialVersionUID:J = 0x29ffcc6947b49592L # instance fields .field private 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 private final message:Ljava/lang/String; # direct methods .method private constructor (Ljava/util/Collection;)V .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection<", "+", "Ljava/lang/Throwable;", ">;)V" } .end annotation .annotation runtime Ljava/lang/Deprecated; .end annotation invoke-direct {p0}, Ljava/lang/RuntimeException;->()V new-instance v0, Ljava/util/LinkedHashSet; invoke-direct {v0}, Ljava/util/LinkedHashSet;->()V new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()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; instance-of v3, v2, Lrx/a/a; if-eqz v3, :cond_0 check-cast v2, Lrx/a/a; iget-object v2, v2, Lrx/a/a;->exceptions:Ljava/util/List; invoke-interface {v0, v2}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z goto :goto_0 :cond_0 if-eqz v2, :cond_1 invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z goto :goto_0 :cond_1 new-instance v2, Ljava/lang/NullPointerException; invoke-direct {v2}, Ljava/lang/NullPointerException;->()V invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z goto :goto_0 :cond_2 new-instance p1, Ljava/lang/NullPointerException; invoke-direct {p1}, Ljava/lang/NullPointerException;->()V invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z :cond_3 invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z invoke-static {v1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List; move-result-object p1 iput-object p1, p0, Lrx/a/a;->exceptions:Ljava/util/List; new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1}, Ljava/lang/StringBuilder;->()V iget-object v0, p0, Lrx/a/a;->exceptions:Ljava/util/List; 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 iput-object p1, p0, Lrx/a/a;->message:Ljava/lang/String; return-void .end method .method public constructor (Ljava/util/Collection;B)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection<", "+", "Ljava/lang/Throwable;", ">;B)V" } .end annotation invoke-direct {p0, p1}, Lrx/a/a;->(Ljava/util/Collection;)V return-void .end method .method public varargs constructor ([Ljava/lang/Throwable;)V .locals 5 invoke-direct {p0}, Ljava/lang/RuntimeException;->()V new-instance v0, Ljava/util/LinkedHashSet; invoke-direct {v0}, Ljava/util/LinkedHashSet;->()V new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V const/4 v2, 0x0 :goto_0 const/4 v3, 0x2 if-ge v2, v3, :cond_2 aget-object v3, p1, v2 instance-of v4, v3, Lrx/a/a; if-eqz v4, :cond_0 check-cast v3, Lrx/a/a; iget-object v3, v3, Lrx/a/a;->exceptions:Ljava/util/List; invoke-interface {v0, v3}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z goto :goto_1 :cond_0 if-eqz v3, :cond_1 invoke-interface {v0, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z goto :goto_1 :cond_1 new-instance v3, Ljava/lang/NullPointerException; invoke-direct {v3}, Ljava/lang/NullPointerException;->()V invoke-interface {v0, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z :goto_1 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_2 invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z invoke-static {v1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List; move-result-object p1 iput-object p1, p0, Lrx/a/a;->exceptions:Ljava/util/List; new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1}, Ljava/lang/StringBuilder;->()V iget-object v0, p0, Lrx/a/a;->exceptions:Ljava/util/List; 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 iput-object p1, p0, Lrx/a/a;->message:Ljava/lang/String; return-void .end method .method private static H(Ljava/lang/Throwable;)Ljava/util/List; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Throwable;", ")", "Ljava/util/List<", "Ljava/lang/Throwable;", ">;" } .end annotation new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V invoke-virtual {p0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable; move-result-object v1 if-eqz v1, :cond_2 if-ne v1, p0, :cond_0 goto :goto_1 :cond_0 :goto_0 invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z invoke-virtual {v1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable; move-result-object p0 if-eqz p0, :cond_2 if-ne p0, v1, :cond_1 goto :goto_1 :cond_1 invoke-virtual {v1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable; move-result-object v1 goto :goto_0 :cond_2 :goto_1 return-object v0 .end method .method private a(Ljava/lang/StringBuilder;Ljava/lang/Throwable;Ljava/lang/String;)V .locals 5 :goto_0 invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 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_1 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_1 :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, "" goto :goto_0 :cond_1 return-void .end method .method private a(Lrx/a/a$b;)V .locals 7 new-instance v0, Ljava/lang/StringBuilder; const/16 v1, 0x80 invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(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}, Lrx/a/a;->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 iget-object v1, p0, Lrx/a/a;->exceptions:Ljava/util/List; 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" invoke-direct {p0, v0, v4, v5}, Lrx/a/a;->a(Ljava/lang/StringBuilder;Ljava/lang/Throwable;Ljava/lang/String;)V add-int/2addr v3, v2 goto :goto_1 :cond_1 invoke-virtual {p1}, Lrx/a/a$b;->Jb()Ljava/lang/Object; move-result-object v1 monitor-enter v1 :try_start_0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-virtual {p1, v0}, Lrx/a/a$b;->br(Ljava/lang/Object;)V 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 goto :goto_3 :goto_2 throw p1 :goto_3 goto :goto_2 .end method .method private static getRootCause(Ljava/lang/Throwable;)Ljava/lang/Throwable; .locals 1 invoke-virtual {p0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable; move-result-object v0 if-eqz v0, :cond_3 if-ne v0, p0, :cond_0 goto :goto_2 :cond_0 :goto_0 invoke-virtual {v0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable; move-result-object p0 if-eqz p0, :cond_2 if-ne p0, v0, :cond_1 goto :goto_1 :cond_1 invoke-virtual {v0}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable; move-result-object v0 goto :goto_0 :cond_2 :goto_1 return-object v0 :cond_3 :goto_2 return-object p0 .end method # virtual methods .method public final declared-synchronized getCause()Ljava/lang/Throwable; .locals 8 monitor-enter p0 :try_start_0 iget-object v0, p0, Lrx/a/a;->cause:Ljava/lang/Throwable; if-nez v0, :cond_4 new-instance v0, Lrx/a/a$a; invoke-direct {v0}, Lrx/a/a$a;->()V new-instance v1, Ljava/util/HashSet; invoke-direct {v1}, Ljava/util/HashSet;->()V iget-object v2, p0, Lrx/a/a;->exceptions:Ljava/util/List; 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_3 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v4 check-cast v4, Ljava/lang/Throwable; invoke-interface {v1, v4}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z move-result v5 if-nez v5, :cond_0 invoke-interface {v1, v4}, Ljava/util/Set;->add(Ljava/lang/Object;)Z invoke-static {v4}, Lrx/a/a;->H(Ljava/lang/Throwable;)Ljava/util/List; move-result-object v5 invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object v5 :goto_1 invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z move-result v6 if-eqz v6, :cond_2 invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v6 check-cast v6, Ljava/lang/Throwable; invoke-interface {v1, v6}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z move-result v7 if-eqz v7, :cond_1 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;->(Ljava/lang/String;)V goto :goto_1 :cond_1 invoke-interface {v1, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 goto :goto_1 :cond_2 :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-static {v3}, Lrx/a/a;->getRootCause(Ljava/lang/Throwable;)Ljava/lang/Throwable; move-result-object v3 goto :goto_0 :cond_3 iput-object v0, p0, Lrx/a/a;->cause:Ljava/lang/Throwable; :cond_4 iget-object v0, p0, Lrx/a/a;->cause:Ljava/lang/Throwable; :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 goto :goto_3 :goto_2 throw v0 :goto_3 goto :goto_2 .end method .method public final getMessage()Ljava/lang/String; .locals 1 iget-object v0, p0, Lrx/a/a;->message:Ljava/lang/String; return-object v0 .end method .method public final printStackTrace()V .locals 1 sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream; invoke-virtual {p0, v0}, Lrx/a/a;->printStackTrace(Ljava/io/PrintStream;)V return-void .end method .method public final printStackTrace(Ljava/io/PrintStream;)V .locals 1 new-instance v0, Lrx/a/a$c; invoke-direct {v0, p1}, Lrx/a/a$c;->(Ljava/io/PrintStream;)V invoke-direct {p0, v0}, Lrx/a/a;->a(Lrx/a/a$b;)V return-void .end method .method public final printStackTrace(Ljava/io/PrintWriter;)V .locals 1 new-instance v0, Lrx/a/a$d; invoke-direct {v0, p1}, Lrx/a/a$d;->(Ljava/io/PrintWriter;)V invoke-direct {p0, v0}, Lrx/a/a;->a(Lrx/a/a$b;)V return-void .end method