Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate network exceptions to :stripe-core. #4800

Merged
merged 4 commits into from
Mar 31, 2022

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Mar 31, 2022

Summary

  • Moves common network exceptions to stripe-core from payments.
    • AuthenticationException (public)
    • PermissionException (public)
    • RateLimitException (public)
    • MaxRetryReachedException (internal)

Motivation

  • Allow other SDKs besides :payments to use the same network exceptions.

Changelog

- [Changed] Relocated common nework exceptions from `com.stripe.android.exception` to `com.stripe.android.core.exception`:
  - AuthenticationException
  - PermissionException
  - RateLimitException 

ccen-stripe
ccen-stripe previously approved these changes Mar 31, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2022

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │           compressed           │          uncompressed          
          ├───────────┬───────────┬────────┼───────────┬───────────┬────────
 APK      │ old       │ new       │ diff   │ old       │ new       │ diff   
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
      dex │  12.6 MiB │  12.6 MiB │ +200 B │  42.5 MiB │  42.5 MiB │  +64 B 
     arsc │   1.6 MiB │   1.6 MiB │    0 B │   1.6 MiB │   1.6 MiB │    0 B 
 manifest │   2.8 KiB │   2.8 KiB │    0 B │  12.1 KiB │  12.1 KiB │    0 B 
      res │ 761.8 KiB │ 761.8 KiB │    0 B │   1.2 MiB │   1.2 MiB │    0 B 
    asset │  78.4 KiB │  78.2 KiB │ -204 B │ 107.8 KiB │ 107.6 KiB │ -204 B 
    other │  79.6 KiB │  79.6 KiB │    0 B │ 154.6 KiB │ 154.6 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  15.1 MiB │  15.1 MiB │   -4 B │  45.5 MiB │  45.5 MiB │ -140 B 

         │          raw           │             unique             
         ├────────┬────────┬──────┼────────┬────────┬──────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff         
─────────┼────────┼────────┼──────┼────────┼────────┼──────────────
   files │      3 │      3 │    0 │        │        │              
 strings │ 204668 │ 204668 │    0 │ 181289 │ 181289 │  0 (+6 -6)   
   types │  35084 │  35084 │    0 │  32712 │  32712 │  0 (+4 -4)   
 classes │  30199 │  30199 │    0 │  30199 │  30199 │  0 (+4 -4)   
 methods │ 176371 │ 176372 │   +1 │ 170948 │ 170949 │ +1 (+14 -13) 
  fields │ 118502 │ 118503 │   +1 │ 117756 │ 117757 │ +1 (+4 -3)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  298 │  298 │  0   
 entries │ 5569 │ 5569 │  0
APK
    compressed    │   uncompressed   │                               
─────────┬────────┼─────────┬────────┤                               
 size    │ diff   │ size    │ diff   │ path                          
─────────┼────────┼─────────┼────────┼───────────────────────────────
 6.3 KiB │ -204 B │ 6.1 KiB │ -204 B │ ∆ assets/dexopt/baseline.prof 
 3.1 MiB │ +200 B │ 8.7 MiB │  +64 B │ ∆ classes2.dex                
─────────┼────────┼─────────┼────────┼───────────────────────────────
 3.1 MiB │   -4 B │ 8.7 MiB │ -140 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff      
  ────────┼────────┼───────────
   181289 │ 181289 │ 0 (+6 -6) 
  + �
  ���
  ���
  
  ���
  ������2�0�B��
  ��������0�¢����¨��
  + �
  ���
  ���
  
  ���
  
  ���
  ������2�0�B���������0��
  ��������0�¢����¨��
  + Lcom/stripe/android/core/exception/AuthenticationException;
  + Lcom/stripe/android/core/exception/MaxRetryReachedException;
  + Lcom/stripe/android/core/exception/PermissionException;
  + Lcom/stripe/android/core/exception/RateLimitException;
  
  - �
  ���
  ���
  
  ���
  �����2�0�B��
  ��������0�¢����¨��
  - �
  ���
  ���
  
  ���
  
  ���
  ������2�0�B��������0��
  ��������0�¢����¨��
  - Lcom/stripe/android/exception/AuthenticationException;
  - Lcom/stripe/android/exception/MaxRetryReachedException;
  - Lcom/stripe/android/exception/PermissionException;
  - Lcom/stripe/android/exception/RateLimitException;
  

TYPES:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   32712 │ 32712 │ 0 (+4 -4) 
  + Lcom/stripe/android/core/exception/AuthenticationException;
  + Lcom/stripe/android/core/exception/MaxRetryReachedException;
  + Lcom/stripe/android/core/exception/PermissionException;
  + Lcom/stripe/android/core/exception/RateLimitException;
  
  - Lcom/stripe/android/exception/AuthenticationException;
  - Lcom/stripe/android/exception/MaxRetryReachedException;
  - Lcom/stripe/android/exception/PermissionException;
  - Lcom/stripe/android/exception/RateLimitException;
  

METHODS:

   old    │ new    │ diff         
  ────────┼────────┼──────────────
   170948 │ 170949 │ +1 (+14 -13) 
  + com.stripe.android.core.exception.AuthenticationException <clinit>()
  + com.stripe.android.core.exception.AuthenticationException <init>(StripeError, String)
  + com.stripe.android.core.exception.AuthenticationException <init>(StripeError, String, int, DefaultConstructorMarker)
  + com.stripe.android.core.exception.MaxRetryReachedException <clinit>()
  + com.stripe.android.core.exception.MaxRetryReachedException <init>()
  + com.stripe.android.core.exception.MaxRetryReachedException <init>(String)
  + com.stripe.android.core.exception.MaxRetryReachedException <init>(String, int, DefaultConstructorMarker)
  + com.stripe.android.core.exception.PermissionException <clinit>()
  + com.stripe.android.core.exception.PermissionException <init>(StripeError, String)
  + com.stripe.android.core.exception.PermissionException <init>(StripeError, String, int, DefaultConstructorMarker)
  + com.stripe.android.core.exception.RateLimitException <clinit>()
  + com.stripe.android.core.exception.RateLimitException <init>()
  + com.stripe.android.core.exception.RateLimitException <init>(StripeError, String, String, Throwable)
  + com.stripe.android.core.exception.RateLimitException <init>(StripeError, String, String, Throwable, int, DefaultConstructorMarker)
  
  - com.stripe.android.exception.AuthenticationException <clinit>()
  - com.stripe.android.exception.AuthenticationException <init>(StripeError, String)
  - com.stripe.android.exception.AuthenticationException <init>(StripeError, String, int, DefaultConstructorMarker)
  - com.stripe.android.exception.MaxRetryReachedException <init>()
  - com.stripe.android.exception.MaxRetryReachedException <init>(String)
  - com.stripe.android.exception.MaxRetryReachedException <init>(String, int, DefaultConstructorMarker)
  - com.stripe.android.exception.PermissionException <clinit>()
  - com.stripe.android.exception.PermissionException <init>(StripeError, String)
  - com.stripe.android.exception.PermissionException <init>(StripeError, String, int, DefaultConstructorMarker)
  - com.stripe.android.exception.RateLimitException <clinit>()
  - com.stripe.android.exception.RateLimitException <init>()
  - com.stripe.android.exception.RateLimitException <init>(StripeError, String, String, Throwable)
  - com.stripe.android.exception.RateLimitException <init>(StripeError, String, String, Throwable, int, DefaultConstructorMarker)
  

FIELDS:

   old    │ new    │ diff       
  ────────┼────────┼────────────
   117756 │ 117757 │ +1 (+4 -3) 
  + com.stripe.android.core.exception.AuthenticationException _stable: int
  + com.stripe.android.core.exception.MaxRetryReachedException _stable: int
  + com.stripe.android.core.exception.PermissionException _stable: int
  + com.stripe.android.core.exception.RateLimitException _stable: int
  
  - com.stripe.android.exception.AuthenticationException _stable: int
  - com.stripe.android.exception.Permissio
...✂

ccen-stripe
ccen-stripe previously approved these changes Mar 31, 2022
ccen-stripe
ccen-stripe previously approved these changes Mar 31, 2022
@carlosmuvi-stripe carlosmuvi-stripe enabled auto-merge (squash) March 31, 2022 19:50
@carlosmuvi-stripe carlosmuvi-stripe merged commit cdf726e into master Mar 31, 2022
@carlosmuvi-stripe carlosmuvi-stripe deleted the c/relocate_common_exceptions branch March 31, 2022 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants