1 36 package org.columba.ristretto.imap; 37 38 45 public class IMAPException extends Exception { 46 47 50 private static final long serialVersionUID = 1L; 51 52 IMAPResponse response; 53 54 58 public IMAPException() { 59 } 60 66 public IMAPException(String arg0, Throwable arg1) { 67 super(arg0, arg1); 68 } 69 70 75 public IMAPException( String s ) 76 { 77 super(s ); 78 } 79 80 85 public IMAPException( IMAPResponse response ) 86 { 87 super(response.getResponseMessage()); 88 this.response = response; 89 } 90 91 96 public IMAPException(Throwable cause) { 97 super(cause); 98 } 99 100 107 public IMAPResponse getResponse() { 108 return response; 109 } 110 113 public String getMessage() { 114 if( response != null) return response.getResponseMessage(); 115 else return super.getMessage(); 116 } 117 } | Popular Tags |