Class PlayerException

All Implemented Interfaces:
Serializable

public class PlayerException extends RuntimeException
Represents an error that occurred during media playback. The exception has additional properties that can uniquely identify the exception. Some valuable errors to handle:
See Also:
  • Method Details

    • getCode

      public int getCode()
      Returns:
      A code representing the specific error condition. The code values depend on the source and result types. For example, if getSource() is "Segment", the result is ErrorType.ERROR_NETWORK, and the code value is 400, this indicates that an HTTP 400 error occurred while trying to download a video segment.
    • getSource

      @NonNull public String getSource()
      Returns:
      The source component within the player that generated the error.
    • getErrorType

      @NonNull public ErrorType getErrorType()
      Returns:
      The result code for the error.
    • getErrorMessage

      @NonNull public String getErrorMessage()
      Returns:
      A message describing the error. This differs from Throwable.getMessage() in that this contains only the error text and not any source or code value.