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 that can have really 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. One Another thing that was also contained in the object that tiani had was the actual exception offcourse.
...