package com.google.firebase.messaging; import java.util.Locale; /* loaded from: classes3.dex */ public final class SendException extends Exception { public static final int ERROR_INVALID_PARAMETERS = 1; public static final int ERROR_SIZE = 2; public static final int ERROR_TOO_MANY_MESSAGES = 4; public static final int ERROR_TTL_EXCEEDED = 3; public static final int ERROR_UNKNOWN = 0; private final int errorCode; public SendException(String str) { super(str); this.errorCode = parseErrorCode(str); } private int parseErrorCode(String str) { if (str == null) { return 0; } String lowerCase = str.toLowerCase(Locale.US); lowerCase.getClass(); char c4 = 65535; switch (lowerCase.hashCode()) { case -1743242157: if (lowerCase.equals("service_not_available")) { c4 = 0; break; } break; case -1290953729: if (lowerCase.equals("toomanymessages")) { c4 = 1; break; } break; case -920906446: if (lowerCase.equals("invalid_parameters")) { c4 = 2; break; } break; case -617027085: if (lowerCase.equals("messagetoobig")) { c4 = 3; break; } break; case -95047692: if (lowerCase.equals("missing_to")) { c4 = 4; break; } break; } switch (c4) { case 0: return 3; case 1: return 4; case 2: case 4: return 1; case 3: return 2; default: return 0; } } public int getErrorCode() { return this.errorCode; } }