I catch Exception and try to examine its getCause() by following some further steps if cause is of type MyException defined in another library.
I get this Eclipse error (compiler?) When trying to check if e.getCause() instanceof MyException :
Incompatible conditional types of operands Throwable and MyException
When I try to make (MyException) e.getCause() I get:
Cannot be thrown from the Throwable to MyException method
I can compile e.getCause().getClass().equals(MyException.class) and this returns true .
source share