Search in sources :

Example 1 with InvalidRepeatableStageParamsException

use of org.hisp.dhis.common.exception.InvalidRepeatableStageParamsException in project dhis2-core by dhis2.

the class DefaultQueryItemLocator method getRepeatableStageParams.

private static RepeatableStageParams getRepeatableStageParams(String dimension) {
    try {
        RepeatableStageParams repeatableStageParams = RepeatableStageParamsHelper.getRepeatableStageParams(dimension);
        repeatableStageParams.setDimension(dimension);
        return repeatableStageParams;
    } catch (InvalidRepeatableStageParamsException e) {
        ErrorMessage errorMessage = new ErrorMessage(dimension, ErrorCode.E1101);
        throw new IllegalQueryException(errorMessage);
    }
}
Also used : InvalidRepeatableStageParamsException(org.hisp.dhis.common.exception.InvalidRepeatableStageParamsException) RepeatableStageParams(org.hisp.dhis.common.RepeatableStageParams) IllegalQueryException(org.hisp.dhis.common.IllegalQueryException) ErrorMessage(org.hisp.dhis.feedback.ErrorMessage)

Aggregations

IllegalQueryException (org.hisp.dhis.common.IllegalQueryException)1 RepeatableStageParams (org.hisp.dhis.common.RepeatableStageParams)1 InvalidRepeatableStageParamsException (org.hisp.dhis.common.exception.InvalidRepeatableStageParamsException)1 ErrorMessage (org.hisp.dhis.feedback.ErrorMessage)1