try {
} catch (Exception e) {
}
try {
} catch (Exception e) {
Throwable rootCause = e;
while (rootCause.getCause() != null) {
rootCause = rootCause.getCause();
}
throw e;
}
public class BaseException extends Exception {
}
public class CustomException extends BaseException {
}
public void someMethod() throws BaseException {
try {
} catch (Exception e) {
}
}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MyClass {
private static final Logger logger = LoggerFactory.getLogger(MyClass.class);
public void someMethod() {
try {
} catch (Exception e) {
}
}
}
public class MyClass {
public void someMethod() {
}
}