Tabnine Logo
ErrorFormatter.formatMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
formatMessage
method
in
com.novoda.noplayer.internal.exoplayer.error.ErrorFormatter

Best Java code snippets using com.novoda.noplayer.internal.exoplayer.error.ErrorFormatter.formatMessage (Showing top 2 results out of 315)

origin: novoda/no-player

  public static NoPlayer.PlayerError errorFor(ExoPlaybackException exception) {
    String message = ErrorFormatter.formatMessage(exception.getCause());

    switch (exception.type) {
      case ExoPlaybackException.TYPE_SOURCE:
        return SourceErrorMapper.map(exception.getSourceException(), message);
      case ExoPlaybackException.TYPE_RENDERER:
        return RendererErrorMapper.map(exception.getRendererException(), message);
      case ExoPlaybackException.TYPE_UNEXPECTED:
        return UnexpectedErrorMapper.map(exception.getUnexpectedException(), message);
      default:
        return new NoPlayerError(PlayerErrorType.UNKNOWN, DetailErrorType.UNKNOWN, message);
    }
  }
}
origin: novoda/no-player

@Test
public void givenThrowable_whenFormattingMessage_thenReturnsExpectedMessageFormat() {
  String expectedFormat = "com.novoda.noplayer.internal.exoplayer.error.ErrorFormatterTest$IncorrectFormatThrowable: message";
  String actualFormat = ErrorFormatter.formatMessage(new IncorrectFormatThrowable(MESSAGE));
  assertThat(actualFormat).isEqualTo(expectedFormat);
}
com.novoda.noplayer.internal.exoplayer.errorErrorFormatterformatMessage

Popular methods of ErrorFormatter

  • formatCodecException

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Collectors (java.util.stream)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now