Answer the question
In order to leave comments, you need to log in
Why convert different types of exceptions to RuntimeException?
In a project, I often see how various exceptions (not only Exception, but also custom ones) are "converted" into RuntimeException. Why is this being done? Is this the correct approach?
try {
//some code
} catch (Exception e) {
throw new RuntimeException(e);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question