fail faster in FileNotFoundException case

Fixes #3053
Closes #4499
// FREEBIE
This commit is contained in:
Jake McGinty 2015-11-12 11:14:45 -08:00 committed by Moxie Marlinspike
parent 5b1e5b18f9
commit e51e5cdfd4
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import org.whispersystems.textsecure.api.push.TextSecureAddress;
import org.whispersystems.textsecure.api.push.exceptions.UnregisteredUserException;
import org.whispersystems.textsecure.api.util.InvalidNumberException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
@ -127,6 +128,9 @@ public class PushMediaSendJob extends PushSendJob implements InjectableType {
} catch (InvalidNumberException | UnregisteredUserException e) {
Log.w(TAG, e);
throw new InsecureFallbackApprovalException(e);
} catch (FileNotFoundException e) {
Log.w(TAG, e);
throw new UndeliverableMessageException(e);
} catch (IOException e) {
Log.w(TAG, e);
throw new RetryLaterException(e);