Java在if里面满足条件就抛异常

if(){
    throw new Exception();
}