Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This is the way errors was handled in the Tiani solution. This code is a part from the epSOS-Web and how it handled the errorCodes from the tiani solution. The advantage with using Objects for this is that you can handle more then one exception which is the case for CDA that can have many errors or partial errors. As its done now in the openNCP only one error is handled since its throwing an exception directly in the code. Another thing that was also contained in the object that tiani had was the actual exception offcourse.

        if (!rsp.getPartialErros().isEmpty()) {
            for (int i = 0; i < rsp.getPartialErros().size(); i++) {
                ErrorFeedback error = new ErrorFeedback();
                error.setErrorCode(rsp.getPartialErros().get(i).getErrorCode());
                error.setErrorMessage(rsp.getPartialErros().get(i).getCodeContext());
                error.setSeverityType(rsp.getPartialErros().get(i).getSeverity());
                errorList.add(error);
            }
        }

 

 

 

  • No labels