このコードNotFoundException
が発生するとメインブロックの例外が発生しますが、発生させたいのですがNotFoundException
、どうすれば対処できますか?
try {
if (x > y) {
throw new NotFoundException("entity is not found");
}
} catch (final Exception e) {
throw new InternalServerErrorException(e);
}