contextprovider/aspectj/src/main/java/io/tracee/contextlogger/contextprovider/aspectj/util/WatchdogUtils.java
public static Class[] getDefinedThrowsFromMethodSignature(final ProceedingJoinPoint proceedingJoinPoint) {

        if (proceedingJoinPoint == null) {
            return new Class[0];
        }

        // get watchdog annotation from method
        MethodSignature methodSignature = (MethodSignature)proceedingJoinPoint.getSignature();

        return methodSignature.getMethod().getExceptionTypes();
    }
public static Class[] getDefinedThrowsFromMethodSignature(final ProceedingJoinPoint proceedingJoinPoint) {

        if (proceedingJoinPoint == null) {
            return new Class[0];
        }

        // get watchdog annotation from method
        MethodSignature methodSignature = (MethodSignature)proceedingJoinPoint.getSignature();

        return methodSignature.getMethod().getExceptionTypes();
    }
Gets all Exceptions declared at the throws part of the method signature.

@param proceedingJoinPoint the proceeding join point to get the method signature from.
@return All defined exceptions that must be caught (are defined in the method signature in the throws part)