Class ExceptionUtil
- java.lang.Object
-
- com.microsoft.azure.eventhubs.impl.ExceptionUtil
-
public final class ExceptionUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ExceptionUtil.SyncFactory<T>
static interface
ExceptionUtil.SyncFactoryVoid
static interface
ExceptionUtil.SyncFactoryWithIllegalArgException<T>
static interface
ExceptionUtil.SyncFactoryWithIOException<T>
-
Constructor Summary
Constructors Constructor Description ExceptionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Throwable
getExceptionFromCompletedFuture(CompletableFuture<?> exceptionallyCompletedFuture)
static <T> T
sync(ExceptionUtil.SyncFactory<T> factory)
static void
syncVoid(ExceptionUtil.SyncFactoryVoid factory)
static <T> T
syncWithIllegalArgException(ExceptionUtil.SyncFactoryWithIllegalArgException<T> factory)
static <T> T
syncWithIOException(ExceptionUtil.SyncFactoryWithIOException<T> factory)
static String
toStackTraceString(Throwable exception, String customErrorMessage)
-
-
-
Method Detail
-
toStackTraceString
public static String toStackTraceString(Throwable exception, String customErrorMessage)
-
getExceptionFromCompletedFuture
public static Throwable getExceptionFromCompletedFuture(CompletableFuture<?> exceptionallyCompletedFuture)
-
sync
public static <T> T sync(ExceptionUtil.SyncFactory<T> factory) throws EventHubException
- Throws:
EventHubException
-
syncWithIOException
public static <T> T syncWithIOException(ExceptionUtil.SyncFactoryWithIOException<T> factory) throws IOException, EventHubException
- Throws:
IOException
EventHubException
-
syncVoid
public static void syncVoid(ExceptionUtil.SyncFactoryVoid factory) throws EventHubException
- Throws:
EventHubException
-
syncWithIllegalArgException
public static <T> T syncWithIllegalArgException(ExceptionUtil.SyncFactoryWithIllegalArgException<T> factory) throws EventHubException
- Throws:
EventHubException
-
-