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")) {
|
part.isMimeType("application/pgp")) {
|
||||||
return getTextFromTextPart(part, body, mimeType, textSizeLimit);
|
return getTextFromTextPart(part, body, mimeType, textSizeLimit);
|
||||||
} else {
|
} else {
|
||||||
throw new MessagingException("Provided non-text part: " + part);
|
throw new MessagingException("Provided non-text part: " + mimeType);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new MessagingException("Provided invalid part: " + part);
|
throw new MessagingException("Provided invalid part");
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(LOG_TAG, "Unable to getTextFromPart", e);
|
Log.e(LOG_TAG, "Unable to getTextFromPart", e);
|
||||||
|
|
Loading…
Reference in a new issue