ExceptionHelper.smali
.class public final Lio/reactivex/internal/util/ExceptionHelper;
.super Ljava/lang/Object;
.source "ExceptionHelper.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/reactivex/internal/util/ExceptionHelper$Termination;
}
.end annotation
# static fields
.field public static final a:Ljava/lang/Throwable;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Lio/reactivex/internal/util/ExceptionHelper$Termination;
invoke-direct {v0}, Lio/reactivex/internal/util/ExceptionHelper$Termination;-><init>()V
sput-object v0, Lio/reactivex/internal/util/ExceptionHelper;->a:Ljava/lang/Throwable;
return-void
.end method
.method public static a(Ljava/lang/Throwable;)Ljava/lang/Exception;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Throwable;",
">(",
"Ljava/lang/Throwable;",
")",
"Ljava/lang/Exception;",
"^TE;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 8
instance-of v0, p0, Ljava/lang/Exception;
if-eqz v0, :cond_7
.line 9
check-cast p0, Ljava/lang/Exception;
return-object p0
.line 10
:cond_7
throw p0
.end method
.method public static a(JLjava/util/concurrent/TimeUnit;)Ljava/lang/String;
.registers 5
.line 11
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "The source did not signal an event for "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p0, " "
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 12
invoke-virtual {p2}, Ljava/util/concurrent/TimeUnit;->toString()Ljava/lang/String;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " and has been terminated."
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static a(Ljava/util/concurrent/atomic/AtomicReference;)Ljava/lang/Throwable;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/atomic/AtomicReference<",
"Ljava/lang/Throwable;",
">;)",
"Ljava/lang/Throwable;"
}
.end annotation
.line 5
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Throwable;
.line 6
sget-object v1, Lio/reactivex/internal/util/ExceptionHelper;->a:Ljava/lang/Throwable;
if-eq v0, v1, :cond_11
.line 7
invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
move-object v0, p0
check-cast v0, Ljava/lang/Throwable;
:cond_11
return-object v0
.end method
.method public static a(Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/Throwable;)Z
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/atomic/AtomicReference<",
"Ljava/lang/Throwable;",
">;",
"Ljava/lang/Throwable;",
")Z"
}
.end annotation
.line 1
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Throwable;
.line 2
sget-object v1, Lio/reactivex/internal/util/ExceptionHelper;->a:Ljava/lang/Throwable;
const/4 v2, 0x0
if-ne v0, v1, :cond_c
return v2
:cond_c
const/4 v1, 0x1
if-nez v0, :cond_11
move-object v3, p1
goto :goto_1d
.line 3
:cond_11
new-instance v3, Lio/reactivex/exceptions/CompositeException;
const/4 v4, 0x2
new-array v4, v4, [Ljava/lang/Throwable;
aput-object v0, v4, v2
aput-object p1, v4, v1
invoke-direct {v3, v4}, Lio/reactivex/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
.line 4
:goto_1d
invoke-virtual {p0, v0, v3}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
return v1
.end method
.method public static b(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
.registers 2
.line 1
instance-of v0, p0, Ljava/lang/Error;
if-nez v0, :cond_11
.line 2
instance-of v0, p0, Ljava/lang/RuntimeException;
if-eqz v0, :cond_b
.line 3
check-cast p0, Ljava/lang/RuntimeException;
return-object p0
.line 4
:cond_b
new-instance v0, Ljava/lang/RuntimeException;
invoke-direct {v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
return-object v0
.line 5
:cond_11
check-cast p0, Ljava/lang/Error;
throw p0
.end method