.class public final Lrx/exceptions/CompositeException; .super Ljava/lang/RuntimeException; .source "CompositeException.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lrx/exceptions/CompositeException$a;, Lrx/exceptions/CompositeException$d;, Lrx/exceptions/CompositeException$c;, Lrx/exceptions/CompositeException$b; } .end annotation # static fields .field private static final serialVersionUID:J = 0x29ffcc6947b49592L # instance fields .field private cause:Ljava/lang/Throwable; .field private 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 public constructor (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;->()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/exceptions/CompositeException; if-eqz v3, :cond_0 check-cast v2, Lrx/exceptions/CompositeException; iget-object v2, v2, Lrx/exceptions/CompositeException;->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-virtual {v1, v0}, Ljava/util/ArrayList;->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/exceptions/CompositeException;->exceptions:Ljava/util/List; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-interface {p1}, Ljava/util/List;->size()I move-result p1 invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string p1, " exceptions occurred. " invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 iput-object p1, p0, Lrx/exceptions/CompositeException;->message:Ljava/lang/String; return-void .end method .method public varargs constructor ([Ljava/lang/Throwable;)V .locals 6 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 array-length v2, p1 const/4 v3, 0x0 :goto_0 if-ge v3, v2, :cond_2 aget-object v4, p1, v3 instance-of v5, v4, Lrx/exceptions/CompositeException; if-eqz v5, :cond_0 check-cast v4, Lrx/exceptions/CompositeException; iget-object v4, v4, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List; invoke-interface {v0, v4}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z goto :goto_1 :cond_0 if-eqz v4, :cond_1 invoke-interface {v0, v4}, Ljava/util/Set;->add(Ljava/lang/Object;)Z goto :goto_1 :cond_1 new-instance v4, Ljava/lang/NullPointerException; invoke-direct {v4}, Ljava/lang/NullPointerException;->()V invoke-interface {v0, v4}, Ljava/util/Set;->add(Ljava/lang/Object;)Z :goto_1 add-int/lit8 v3, v3, 0x1 goto :goto_0 :cond_2 invoke-virtual {v1, v0}, Ljava/util/ArrayList;->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/exceptions/CompositeException;->exceptions:Ljava/util/List; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-interface {p1}, Ljava/util/List;->size()I move-result p1 invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string p1, " exceptions occurred. " invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 iput-object p1, p0, Lrx/exceptions/CompositeException;->message:Ljava/lang/String; return-void .end method # virtual methods .method public final a(Ljava/lang/StringBuilder;Ljava/lang/Throwable;Ljava/lang/String;)V .locals 5 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_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 .end method .method public b()Ljava/util/List; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Ljava/lang/Throwable;", ">;" } .end annotation iget-object v0, p0, Lrx/exceptions/CompositeException;->exceptions:Ljava/util/List; return-object v0 .end method .method public final c(Lrx/exceptions/CompositeException$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}, 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 iget-object v1, p0, Lrx/exceptions/CompositeException;->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-virtual {p0, v0, v4, v5}, Lrx/exceptions/CompositeException;->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/exceptions/CompositeException$b;->a()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/exceptions/CompositeException$b;->b(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 throw p1 .end method .method public declared-synchronized getCause()Ljava/lang/Throwable; .locals 8 monitor-enter p0 :try_start_0 iget-object v0, p0, Lrx/exceptions/CompositeException;->cause:Ljava/lang/Throwable; if-nez v0, :cond_b new-instance v0, Lrx/exceptions/CompositeException$a; invoke-direct {v0}, Lrx/exceptions/CompositeException$a;->()V new-instance v1, Ljava/util/HashSet; invoke-direct {v1}, Ljava/util/HashSet;->()V iget-object v2, p0, Lrx/exceptions/CompositeException;->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_a invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v4 check-cast v4, Ljava/lang/Throwable; invoke-virtual {v1, v4}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z move-result v5 if-eqz v5, :cond_1 goto :goto_0 :cond_1 invoke-virtual {v1, v4}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z new-instance v5, Ljava/util/ArrayList; invoke-direct {v5}, Ljava/util/ArrayList;->()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 invoke-virtual {v5, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z 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 invoke-virtual {v5}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; 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; invoke-virtual {v1, v6}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z 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;->(Ljava/lang/String;)V goto :goto_3 :cond_5 invoke-virtual {v1, v6}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z :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 iput-object v0, p0, Lrx/exceptions/CompositeException;->cause:Ljava/lang/Throwable; :cond_b iget-object v0, p0, Lrx/exceptions/CompositeException;->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 throw v0 .end method .method public getMessage()Ljava/lang/String; .locals 1 iget-object v0, p0, Lrx/exceptions/CompositeException;->message:Ljava/lang/String; return-object v0 .end method .method public printStackTrace()V .locals 1 sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream; invoke-virtual {p0, v0}, Lrx/exceptions/CompositeException;->printStackTrace(Ljava/io/PrintStream;)V return-void .end method .method public printStackTrace(Ljava/io/PrintStream;)V .locals 1 new-instance v0, Lrx/exceptions/CompositeException$c; invoke-direct {v0, p1}, Lrx/exceptions/CompositeException$c;->(Ljava/io/PrintStream;)V invoke-virtual {p0, v0}, Lrx/exceptions/CompositeException;->c(Lrx/exceptions/CompositeException$b;)V return-void .end method .method public printStackTrace(Ljava/io/PrintWriter;)V .locals 1 new-instance v0, Lrx/exceptions/CompositeException$d; invoke-direct {v0, p1}, Lrx/exceptions/CompositeException$d;->(Ljava/io/PrintWriter;)V invoke-virtual {p0, v0}, Lrx/exceptions/CompositeException;->c(Lrx/exceptions/CompositeException$b;)V return-void .end method