Skip to main content

Posts

Showing posts with the label Oracle ADF error handling

Error Handling ADF

Created a custom error handler to customize any exceptions that come along. (We throw message keys from the model layer and handle them auto-magically in the handler) . Create an exception handler class. Add the attribute ErrorHandlerClass   to the root Application tag to DataBindings.cpx ErrorHandlerClass="za.co.transcode.adf.mdm.model.messages.ReferenceCustomMessageHandler". NOTE: This is not production ready code and needs a few performance tweaks but you will get the idea. This is in our common project you would just override this class in the dependant projects with skipLists and overrideList populated ( skipList = {{"java.lang.NullPointerException", null}, {" java.sql.SQLException ", "1234"}} OR overrideList = {{"java.lang.SQLException", "9999", "This should never happen"} } ) Code for custom handler: package za.co.transcode.adf.common.model.messages; import java.sql.SQLException; import oracle.adf....