Source:
<code>private void evaluatePatch(Context context, HttpServletRequest request, WorkspaceItem source, WorkspaceItemRest wsi, String section, Operation op) { boolean sectionExist = false; SubmissionConfig submissionConfig = submissionConfigReader .getSubmissionConfigByName(wsi.getSubmissionDefinition().getName()); for (int stepNum = 0; stepNum < submissionConfig.getNumberOfSteps(); stepNum++) { SubmissionStepConfig stepConfig = submissionConfig.getStep(stepNum); if (section.equals(stepConfig.getId())) { sectionExist = true; ClassLoader loader = this.getClass().getClassLoader(); Class stepClass; try { stepClass = loader.loadClass(stepConfig.getProcessingClassName()); Object stepInstance = stepClass.newInstance(); if (stepInstance instanceof AbstractRestProcessingStep) { AbstractRestProcessingStep stepProcessing = (AbstractRestProcessingStep) stepClass.newInstance(); stepProcessing.doPreProcessing(context, source); stepProcessing.doPatchProcessing(context, getRequestService().getCurrentRequest(), source, op, stepConfig); stepProcessing.doPostProcessing(context, source); } else { throw new DSpaceBadRequestException( "The submission step class specified by '" + stepConfig.getProcessingClassName() + "' does not extend the class org.dspace.submit.AbstractProcessingStep!" + " Therefore it cannot be used by the Configurable Submission as the <processing-class>!"); } } catch (UnprocessableEntityException e) { <START> log.error(e.getMessage(), e); <END> throw new UnprocessableEntityException("Error processing the patch request", e); } catch (Exception e) { log.error(e.getMessage(), e); throw new PatchException("Error processing the patch request", e); } } } if (!sectionExist) { throw new UnprocessableEntityException("The section with name " + section + " does not exist in this submission!"); } }</code><technical_language>Please log a more useful message e.getMessage(), e.g. message in line</technical_language>

Target:
private void evaluatePatch(Context context, HttpServletRequest request, WorkspaceItem source, WorkspaceItemRest wsi, String section, Operation op) { boolean sectionExist = false; SubmissionConfig submissionConfig = submissionConfigReader .getSubmissionConfigByName(wsi.getSubmissionDefinition().getName()); for (int stepNum = 0; stepNum < submissionConfig.getNumberOfSteps(); stepNum++) { SubmissionStepConfig stepConfig = submissionConfig.getStep(stepNum); if (section.equals(stepConfig.getId())) { sectionExist = true; ClassLoader loader = this.getClass().getClassLoader(); Class stepClass; try { stepClass = loader.loadClass(stepConfig.getProcessingClassName()); Object stepInstance = stepClass.newInstance(); if (stepInstance instanceof AbstractRestProcessingStep) { AbstractRestProcessingStep stepProcessing = (AbstractRestProcessingStep) stepClass.newInstance(); stepProcessing.doPreProcessing(context, source); stepProcessing.doPatchProcessing(context, getRequestService().getCurrentRequest(), source, op, stepConfig); stepProcessing.doPostProcessing(context, source); } else { throw new DSpaceBadRequestException( "The submission step class specified by '" + stepConfig.getProcessingClassName() + "' does not extend the class org.dspace.submit.AbstractProcessingStep!" + " Therefore it cannot be used by the Configurable Submission as the <processing-class>!"); } } catch (UnprocessableEntityException e) { throw e; } catch (Exception e) { log.error(e.getMessage(), e); throw new PatchException("Error processing the patch request", e); } } } if (!sectionExist) { throw new UnprocessableEntityException("The section with name " + section + " does not exist in this submission!"); } }