Tabnine Logo
Eventual.onError
Code IndexAdd Tabnine to your IDE (free)

How to use
onError
method
in
com.hotels.styx.api.Eventual

Best Java code snippets using com.hotels.styx.api.Eventual.onError (Showing top 2 results out of 315)

origin: HotelsDotCom/styx

@Override
public Eventual<LiveHttpResponse> handle(LiveHttpRequest request, HttpInterceptor.Context context) {
  return getCurrentOrPutNewState(request, context)
      .onError(cause -> handleErrors(cause, context));
}
origin: HotelsDotCom/styx

  @Test
  public void mapsErrors() {
    Eventual<String> eventual = Eventual.<String>error(new RuntimeException("ouch"))
        .onError(it -> Eventual.of("mapped error: " + it.getMessage()));

    StepVerifier.create(eventual)
        .expectNext("mapped error: ouch")
        .verifyComplete();
  }
}
com.hotels.styx.apiEventualonError

Javadoc

Transforms an error by applying an error handler function.

Popular methods of Eventual

  • of
    Creates a new Eventual object from given value.
  • map
    Transforms an element synchronously by applying a mapping function.
  • <init>
    Constructs a new Eventual object from an reactive streams Publisher.
  • flatMap
    Transform an element asynchronously by applying a mapping function.
  • from
    Creates a new Eventual from a CompletionStage.
  • error
    Creates a new (@link Eventual} that emits an error.
  • fromMono

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Table (org.hibernate.mapping)
    A relational table
  • Top Vim 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