Back to project page hubblog.
The source code is released under:
MIT License
If you think the Android project hubblog listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.mobile.Accounts; //from w ww . j a va2 s .c o m /** * Created with IntelliJ IDEA. * User: donski * Date: 10/12/13 * Time: 20:43 */ import java.io.IOException; /** * Exception class to be thrown when server responds with a 401 and * an X-GitHub-OTP: required;:2fa-type header. * This exception wraps an {@link IOException} that is the actual exception * that occurred when the request was made. */ public class TwoFactorAuthException extends IOException { /** * serialVersionUID */ private static final long serialVersionUID = 3889626691109709714L; /** * Cause exception */ protected final IOException cause; /** * Two-factor authentication type */ public final int twoFactorAuthType; /** * Create two-factor authentication exception * * @param cause * @param twoFactorAuthType */ public TwoFactorAuthException(IOException cause, int twoFactorAuthType) { this.cause = cause; this.twoFactorAuthType = twoFactorAuthType; } @Override public String getMessage() { return cause != null ? cause.getMessage() : super.getMessage(); } @Override public IOException getCause() { return cause; } }