Class AsyncError


  • public final class AsyncError
    extends Object
    Utility functions to stitch exception from 2 different sources, moments together in order to preserve some connection between 2 handlers.
    Author:
    Paulo Lopes
    • Method Detail

      • combine

        public static Throwable combine​(Throwable throwable,
                                        String jsAsyncStackLines)
        Stitches the given throwable with the current execution stack trace at the moment this function is invoked.
        Parameters:
        throwable - a throwable object
        jsAsyncStackLines - the js async stack lines to be inserted
        Returns:
        the enhanced throwable
      • combine

        public static <T> Throwable combine​(io.vertx.core.AsyncResult<T> asyncResult,
                                            String jsAsyncStackLines)
        Stitches the given cause of the asyncResult with the current execution stack trace at the moment this function is invoked.
        Type Parameters:
        T - the kind of async result
        Parameters:
        asyncResult - a asyncResult object
        jsAsyncStackLines - the js async stack lines to be inserted
        Returns:
        the enhanced throwable
      • combine

        public static String combine​(String currentStackLines,
                                     String asyncStackLines)
        Stiches the given 2 strings in js stack format.
        Parameters:
        currentStackLines - the js current stack lines
        asyncStackLines - the js async stack lines to be inserted
        Returns:
        the enhanced stack