Avoid crashing with NPE when creating exception message
This commit is contained in:
parent
ac55279b8e
commit
68e3c2a431
1 changed files with 2 additions and 2 deletions
|
@ -54,10 +54,10 @@ public class MessageExtractor {
|
|||
part.isMimeType("application/pgp")) {
|
||||
return getTextFromTextPart(part, body, mimeType, textSizeLimit);
|
||||
} else {
|
||||
throw new MessagingException("Provided non-text part: " + part);
|
||||
throw new MessagingException("Provided non-text part: " + mimeType);
|
||||
}
|
||||
} else {
|
||||
throw new MessagingException("Provided invalid part: " + part);
|
||||
throw new MessagingException("Provided invalid part");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e(LOG_TAG, "Unable to getTextFromPart", e);
|
||||
|
|
Loading…
Reference in a new issue