throw new AccessException("Current user does not have required permission");当我使用一个没有权限的用户时,我得到的是java.lang.reflect.UndeclaredThrowableException而不是AccessException。
有些奇怪的事情我无法向自己解释,所以请帮助我理解。 super(message);}
现在,当我在类中创建一个方法并编写IDE中获得了消息unreported exception MyParameterException must be caught or declared to be thrown,但是对于我可以提交方法的第一个异常却只字未提据我所知,这一方