Professional Documents
Culture Documents
database
@Override
public void reportException(DCBindingContainer
dCBindingContainer, Exception exception) {
super.reportException(dCBindingContainer, exception);
}
}
Then in the associated DataBindings.cpx file set the
ErrorHandlerClass property to specify your new class and package
name: eg. view.controller.frameworkExtension.ErrorHandlerImpl.
If you receive an error in this step, the following post may resolve
your issues.
<bindings>
<methodaction id="logError"
instancename="AppModuleDataControl.dataProvider"
datacontrol="AppModuleDataControl.dataProvider"
requiresupdatemodel="true" action="invokeAction"
methodname="logExceptionToDatabase"
isviewobjectmethod="false">
<nameddata ndname="message" ndtype="java.lang.String"/>
... and so on ...
</methodaction>
</bindings>
String error =
getDisplayMessage(dCBindingContainer.getBindingContext(),
exception);
OperationBinding operationBinding =
templateBindingContainer.getOperationBinding("logError");
Map params = ob.getParamsMap();
params.put("message", error);
ob.execute();
super.reportException(dCBindingContainer, exception);
}