PicketlinkIDMOrganizationServiceImpl.recoverFromIDMError() method was added with GTNPORTAL-2928 changes to have a single place to handle exceptions at the IDM layer.
As the code in the upper layer (WebUI classes) is not prepared to handle the exception, the current implementation does a rollback of the failed transaction, and starts a new one afterwards.
In a custom implementation using the IDM layer, it could be desirable to let the exception bubble up the stack instead. For this, users can create subclass of PicketlinkIDMOrganizationServiceImpl and
override method recoverFromIDMError() with their own code for recovery
error and rollback of their own transaction abstraction.
To access the original exception for some reason, the signature of recoverFromIDMError() should be changed to include the exception, so the
signature will be "recoverFromIDMError(Exception e)" .