Package io.reactiverse.es4x.impl
Class AsyncError
- java.lang.Object
-
- io.reactiverse.es4x.impl.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Throwablecombine(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.static Stringcombine(String currentStackLines, String asyncStackLines)Stiches the given 2 strings in js stack format.static Throwablecombine(Throwable throwable, String jsAsyncStackLines)Stitches the given throwable with the current execution stack trace at the moment this function is invoked.static StackTraceElementparseStrackTraceElement(String element)
-
-
-
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 objectjsAsyncStackLines- 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 objectjsAsyncStackLines- 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 linesasyncStackLines- the js async stack lines to be inserted- Returns:
- the enhanced stack
-
parseStrackTraceElement
public static StackTraceElement parseStrackTraceElement(String element)
-
-