It's better to simply throw the existing exception than to catch it, throw it away, and then throw a brand new exception. You're losing the history of the first exception, which is very valuable to identify and solve the problem.
|
throw new Exception("Error while saving a collection"); |
It's better to simply throw the existing exception than to catch it, throw it away, and then throw a brand new exception. You're losing the history of the first exception, which is very valuable to identify and solve the problem.
HobbyCollection/src/main/java/com/hobbycollection/dao/CollectionDAOStub.java
Line 58 in b8d9a3d