Skip to content

Commit

Permalink
update an exception message (iluwatar#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejsvisockis committed Apr 15, 2024
1 parent f4e2520 commit 584a8ca
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public <T extends RecordBase> List<T> findAll(Class<T> clazz) {
return recordList;
}
} catch (SQLException e) {
throw new RuntimeException(e);
throw new RuntimeException(
"Unable to find all the records for the following domain model : " + clazz.getName()
+ " due to the data persistence error", e);
}
}

Expand All @@ -66,7 +68,10 @@ public <T extends RecordBase> T findById(Long id, Class<T> clazz) {
return getDeclaredClassInstance(clazz);
}
} catch (SQLException e) {
throw new RuntimeException(e);
throw new RuntimeException(
"Unable to the record for the following domain model : " + clazz.getName() + " by id="
+ id
+ " due to the data persistence error", e);
}
}

Expand Down

0 comments on commit 584a8ca

Please sign in to comment.