Introduce default error object with context for not found exceptions

This commit is contained in:
René Pfeuffer
2018-10-18 13:12:16 +02:00
parent a56aeca8d2
commit b74fb814b8
61 changed files with 395 additions and 1553 deletions

View File

@@ -30,7 +30,7 @@ public class ManagerDaoAdapter<T extends ModelObject> {
afterUpdate.handle(notModified);
} else {
throw new NotFoundException();
throw new NotFoundException(object.getClass(), object.getId());
}
}
@@ -58,7 +58,7 @@ public class ManagerDaoAdapter<T extends ModelObject> {
dao.delete(toDelete);
afterDelete.handle(toDelete);
} else {
throw new NotFoundException();
throw new NotFoundException(toDelete.getClass(), toDelete.getId());
}
}