java.lang.Object
ushiosan.jvm.UError
-
Method Summary
Modifier and TypeMethodDescriptionextractTrace(@NotNull Throwable exception) Gets the content of an exception in text format.extractTrace(@NotNull Throwable exception, int deep) Gets the content of an exception in text format.Gets the base cause of the exception.Gets the base cause of the exception.
-
Method Details
-
rootError
@NotNull public static @NotNull Throwable rootError(@NotNull @NotNull Throwable exception, int deep) Gets the base cause of the exception. This method tries to find the main or root cause of the exception, it returns the same object if the exception is already the main cause.- Parameters:
exception- base exception to analyzedeep- the maximum size of steps before reaching the root of the error. If the value is0, then it tries to return the original cause of the error (recursive).- Returns:
- the root cause of error
-
rootError
Gets the base cause of the exception. This method tries to find the main or root cause of the exception, it returns the same object if the exception is already the main cause.- Parameters:
exception- base exception to analyze- Returns:
- the root cause of error
- See Also:
-
extractTrace
@NotNull public static @NotNull String extractTrace(@NotNull @NotNull Throwable exception, int deep) Gets the content of an exception in text format.- Parameters:
exception- base exception to analyzedeep- the maximum size of steps before reaching the root of the error. If the value is0, then it tries to return the original cause of the error (recursive).- Returns:
- The content of the exception in text format
-
extractTrace
Gets the content of an exception in text format.- Parameters:
exception- base exception to analyze- Returns:
- The content of the exception in text format
-