Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0c5a1a6c
authored
May 01, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Distinguish exceptions caught at top level.
parent
efb9ff1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
library/src/main/java/com/google/android/exoplayer/ExoPlaybackException.java
library/src/main/java/com/google/android/exoplayer/ExoPlayerImplInternal.java
library/src/main/java/com/google/android/exoplayer/ExoPlaybackException.java
View file @
0c5a1a6c
...
...
@@ -20,18 +20,32 @@ package com.google.android.exoplayer;
* <p>
* Where possible, the cause returned by {@link #getCause()} will indicate the reason for failure.
*/
public
class
ExoPlaybackException
extends
Exception
{
public
final
class
ExoPlaybackException
extends
Exception
{
/**
* True if the cause (i.e. the {@link Throwable} returned by {@link #getCause()}) was only caught
* by a fail-safe at the top level of the player. False otherwise.
*/
public
final
boolean
caughtAtTopLevel
;
public
ExoPlaybackException
(
String
message
)
{
super
(
message
);
caughtAtTopLevel
=
false
;
}
public
ExoPlaybackException
(
Throwable
cause
)
{
super
(
cause
);
caughtAtTopLevel
=
false
;
}
public
ExoPlaybackException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
caughtAtTopLevel
=
false
;
}
/* package */
ExoPlaybackException
(
Throwable
cause
,
boolean
caughtAtTopLevel
)
{
super
(
cause
);
this
.
caughtAtTopLevel
=
caughtAtTopLevel
;
}
}
library/src/main/java/com/google/android/exoplayer/ExoPlayerImplInternal.java
View file @
0c5a1a6c
...
...
@@ -233,7 +233,7 @@ import java.util.List;
return
true
;
}
catch
(
RuntimeException
e
)
{
Log
.
e
(
TAG
,
"Internal runtime error."
,
e
);
eventHandler
.
obtainMessage
(
MSG_ERROR
,
new
ExoPlaybackException
(
e
)).
sendToTarget
();
eventHandler
.
obtainMessage
(
MSG_ERROR
,
new
ExoPlaybackException
(
e
,
true
)).
sendToTarget
();
stopInternal
();
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment