Improve logging for failed DB queries

This commit is contained in:
James Seibel
2023-10-07 15:53:07 -05:00
parent 4ddfb8342d
commit e0d25fdd88
@@ -180,7 +180,10 @@ public abstract class AbstractDhRepo<TDTO extends IBaseDTO>
{
// SQL exceptions generally only happen when something is wrong with
// the database or the query and should cause the system to blow up to notify the developer
throw new RuntimeException("Unexpected Query error: ["+e.getMessage()+"], for script: ["+sql+"].", e);
String message = "Unexpected Query error: ["+e.getMessage()+"], for script: ["+sql+"].";
LOGGER.error(message);
throw new RuntimeException(message, e);
}
}