diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/exception/DatatableNotFoundException.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/exception/DatatableNotFoundException.java new file mode 100644 index 000000000..a82da4fb6 --- /dev/null +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/dataqueries/exception/DatatableNotFoundException.java @@ -0,0 +1,22 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ +package org.mifosplatform.infrastructure.dataqueries.exception; + +import org.mifosplatform.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; + +/** + * A {@link RuntimeException} thrown when client resources are not found. + */ +public class DatatableNotFoundException extends AbstractPlatformResourceNotFoundException { + + public DatatableNotFoundException(final String datatable, final Long id) { + super("error.msg.datatable.data.not.found", "Data not found for datatable: ", datatable + " Id:" + id); + } + + public DatatableNotFoundException(final String datatable) { + super("error.msg.datatable.not.found", "Datatable not found.", datatable); + } +} \ No newline at end of file