// This is for the new API:
// if (o instanceof org.apache.struts2.spi.Interceptor)
// return new InterceptorAdapter((org.apache.struts2.spi.Interceptor) o);
throw new ConfigurationException(
"Class [" + className + "] does not implement Interceptor", interceptorConfig);
} catch (InstantiationException e) {
throw new ConfigurationException(
"Unable to instantiate an instance of Interceptor class [" + className + "].",
e, interceptorConfig);
} catch (IllegalAccessException e) {
throw new ConfigurationException(
"IllegalAccessException while attempting to instantiate an instance of Interceptor class ["
+ className + "].",
e, interceptorConfig);
} catch (Exception e) {
throw new ConfigurationException(
"Caught Exception while registering Interceptor class " + className,
e, interceptorConfig);
} catch (NoClassDefFoundError e) {
throw new ConfigurationException(
"Could not load class " + className
+ ". Perhaps it exists but certain dependencies are not available?",
e, interceptorConfig);
}
}