Last active
March 6, 2024 21:52
-
-
Save ivangarzab/5f35510e91bca94afcdb6cc9e9cbcdc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MixhaloError { | |
String getMessage(); | |
int getErrorCode(); | |
} | |
public enum ConnectionError implements MixhaloError { | |
INVALID_WIFI_STATE("", 1000101), | |
INVALID_CELLULAR_STATE("", 1000102), | |
INVALID_VENUE_ID("", 1000300), | |
INVALID_VENUE_PASSCODE("", 1000301), | |
FAILED_VENUE_NETWORK_FETCH("", 1000402), | |
FAILED_VENUE_CONNECTION("", 1000500) | |
; | |
/** | |
* Error message to be used to indicate to the user what went wrong. | |
*/ | |
public String message; | |
/** | |
* Error code meant to identify each individual error. | |
*/ | |
private final int errorCode; | |
ConnectionError(final String message, final int errorCode) { | |
this.message = message; | |
this.errorCode = errorCode; | |
} | |
@Override | |
public String getMessage() { | |
return message; | |
} | |
@Override | |
public int getErrorCode() { | |
return errorCode; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment