Browse Source

Add parseError

Pascal Peridont 19 years ago
parent
commit
ff7faaf2e6
2 changed files with 4 additions and 2 deletions
  1. 2 0
      std/mtwin/mail/Exception.hx
  2. 2 2
      std/mtwin/mail/ImapEnvelope.hx

+ 2 - 0
std/mtwin/mail/Exception.hx

@@ -36,4 +36,6 @@ enum Exception {
 	UnknowResponse(r:String);
 	UnknowResponse(r:String);
 	BadResponse(r:String);
 	BadResponse(r:String);
 	ImapFetchError(id:Int);
 	ImapFetchError(id:Int);
+
+	ParseError(s:String);
 }
 }

+ 2 - 2
std/mtwin/mail/ImapEnvelope.hx

@@ -135,8 +135,8 @@ class ImapEnvelope {
 					var bs = b.toString();
 					var bs = b.toString();
 					if( bs == "NIL" )
 					if( bs == "NIL" )
 						addElement( null );
 						addElement( null );
-					//else
-						//throw ParseError(bs);
+					else
+						throw ParseError(bs);
 			}
 			}
 		}
 		}
 		ret.__length = p;
 		ret.__length = p;