TapatalkException.java (837B)
1 /** 2 * 3 */ 4 package de.mtbnews.android.tapatalk; 5 6 /** 7 * @author dankert 8 * 9 */ 10 public class TapatalkException extends Exception 11 { 12 public static enum TapatalkErrorCode 13 { 14 NO_USERNAME, LOGIN_FAILED, XMLRPC_ERROR, UNKNOWN_SERVER_RESPONSE, SEND_MESSAGE_FAILED; 15 } 16 17 private TapatalkErrorCode errorCode; 18 19 /** 20 * @param detailMessage 21 * @param throwable 22 * @param errorCode 23 * TODO 24 */ 25 public TapatalkException(String detailMessage, Throwable throwable, TapatalkErrorCode errorCode) 26 { 27 28 super(detailMessage, throwable); 29 this.errorCode = errorCode; 30 } 31 32 /** 33 * @param detailMessage 34 */ 35 public TapatalkException(String detailMessage, TapatalkErrorCode errorCode) 36 { 37 super(detailMessage); 38 this.errorCode = errorCode; 39 } 40 41 /** 42 * @return 43 */ 44 public TapatalkErrorCode getErrorCode() 45 { 46 return errorCode; 47 } 48 }