private void handleErrorMessage(int code) throws TwitPicException {
switch(code){
case TwitPicException.ERROR_IMAGE_NOT_FOUND:
throw new ImageNotFoundException();
case TwitPicException.ERROR_IMAGE_TOO_LARGE:
throw new ImageTooLargeException();
case TwitPicException.ERROR_INVALID_IMAGE_TYPE:
throw new InvalidImageTypeException();
case TwitPicException.ERROR_INVALID_USER_OR_PASS:
throw new InvalidUsernameOrPasswordException();
}