Java com.google.common.base Throwables fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.base Throwables fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.base Throwables.

The text is from its open source code.

Method

ListgetCausalChain(Throwable throwable)
Gets a Throwable cause chain as a list.
ThrowablegetRootCause(Throwable throwable)
Returns the innermost cause of throwable .
StringgetStackTraceAsString(Throwable throwable)
Returns a string containing the result of Throwable#toString() toString() , followed by the full, recursive stack trace of throwable .
RuntimeExceptionpropagate(Throwable throwable)
Propagates throwable as-is if it is an instance of RuntimeException or Error , or else as a last resort, wraps it in a RuntimeException and then propagates.
voidpropagateIfInstanceOf(@Nullable Throwable throwable, Class declaredType)
Propagates throwable exactly as-is, if and only if it is an instance of declaredType .
voidpropagateIfPossible(@Nullable Throwable throwable, Class declaredType)
Propagates throwable exactly as-is, if and only if it is an instance of RuntimeException , Error , or declaredType .
voidpropagateIfPossible(@Nullable Throwable throwable)
Propagates throwable exactly as-is, if and only if it is an instance of RuntimeException or Error .
voidpropagateIfPossible( @Nullable Throwable throwable, Class declaredType1, Class declaredType2)
Propagates throwable exactly as-is, if and only if it is an instance of RuntimeException , Error , declaredType1 , or declaredType2 .