// Nothing to do, then
return exceptionConfig;
}
// Make sure that this config is of the right class
ExceptionConfig baseConfig = null;
if (actionConfig != null) {
baseConfig = actionConfig.findExceptionConfig(ancestor);
}
if (baseConfig == null) {
// This means either there's no actionConfig anyway, or the
// ancestor is not defined within the action.
baseConfig = moduleConfig.findExceptionConfig(ancestor);
}
if (baseConfig == null) {
throw new UnavailableException("Unable to find "
+ "exception config '" + ancestor + "' to extend.");
}
// Was our config's class overridden already?
if (exceptionConfig.getClass().equals(ExceptionConfig.class)) {
// Ensure that our config is using the correct class
if (!baseConfig.getClass().equals(exceptionConfig.getClass())) {
// Replace the config with an instance of the correct class
ExceptionConfig newExceptionConfig = null;
String baseConfigClassName = baseConfig.getClass().getName();
try {
newExceptionConfig =
(ExceptionConfig) RequestUtils.applicationInstance(