RouteException.smali 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. .class public final Lokhttp3/internal/connection/RouteException;
  2. .super Ljava/lang/RuntimeException;
  3. .source ""
  4. # static fields
  5. .field private static final addSuppressedExceptionMethod:Ljava/lang/reflect/Method;
  6. # instance fields
  7. .field private lastException:Ljava/io/IOException;
  8. # direct methods
  9. .method static constructor <clinit>()V
  10. .locals 4
  11. :try_start_0
  12. const-class v0, Ljava/lang/Throwable;
  13. const/4 v1, 0x1
  14. new-array v1, v1, [Ljava/lang/Class;
  15. const/4 v2, 0x0
  16. const-class v3, Ljava/lang/Throwable;
  17. aput-object v3, v1, v2
  18. :try_end_0
  19. .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
  20. const-string v2, "addSuppressed"
  21. :try_start_1
  22. invoke-virtual {v0, v2, v1}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
  23. move-result-object v0
  24. :try_end_1
  25. .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
  26. goto :goto_0
  27. :catch_0
  28. const/4 v0, 0x0
  29. :goto_0
  30. sput-object v0, Lokhttp3/internal/connection/RouteException;->addSuppressedExceptionMethod:Ljava/lang/reflect/Method;
  31. return-void
  32. .end method
  33. .method public constructor <init>(Ljava/io/IOException;)V
  34. .locals 0
  35. invoke-direct {p0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
  36. iput-object p1, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
  37. return-void
  38. .end method
  39. .method private addSuppressedIfPossible(Ljava/io/IOException;Ljava/io/IOException;)V
  40. .locals 3
  41. sget-object v0, Lokhttp3/internal/connection/RouteException;->addSuppressedExceptionMethod:Ljava/lang/reflect/Method;
  42. if-eqz v0, :cond_0
  43. const/4 v1, 0x1
  44. :try_start_0
  45. new-array v1, v1, [Ljava/lang/Object;
  46. const/4 v2, 0x0
  47. aput-object p2, v1, v2
  48. invoke-virtual {v0, p1, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
  49. :try_end_0
  50. .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
  51. .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
  52. :catch_0
  53. :cond_0
  54. return-void
  55. .end method
  56. # virtual methods
  57. .method public addConnectException(Ljava/io/IOException;)V
  58. .locals 1
  59. iget-object v0, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
  60. invoke-direct {p0, p1, v0}, Lokhttp3/internal/connection/RouteException;->addSuppressedIfPossible(Ljava/io/IOException;Ljava/io/IOException;)V
  61. iput-object p1, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
  62. return-void
  63. .end method
  64. .method public getLastConnectException()Ljava/io/IOException;
  65. .locals 1
  66. iget-object v0, p0, Lokhttp3/internal/connection/RouteException;->lastException:Ljava/io/IOException;
  67. return-object v0
  68. .end method