Anonymous
public text v1 · immutablepublic class TryReturn {
/**
* @param args
*/
public static void main(String[] args) {
try {
exceptionThower(false);
return; //here
} catch (BusinessException e) {
//store exception
}
//or here
}
private static boolean exceptionThower(boolean shouldI) throws BusinessException {
if (shouldI) {
throw new BusinessException("Just for fun");
}
return shouldI;
}
}