Improve bug detection

- Show a message with the appropriate error (network error)
This commit is contained in:
mauriciocolli 2017-03-17 12:09:20 -03:00 committed by GitHub
parent c100d15ba8
commit e406ba094c
1 changed files with 9 additions and 0 deletions

View File

@ -818,6 +818,15 @@ public class PopupVideoPlayer extends Service implements StateInterface {
});
}
});
} catch (IOException ie) {
if (DEBUG) ie.printStackTrace();
mainHandler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(PopupVideoPlayer.this, R.string.network_error, Toast.LENGTH_SHORT).show();
}
});
stopSelf();
} catch (Exception e) {
if (DEBUG) e.printStackTrace();
mainHandler.post(new Runnable() {