if (!(src instanceof EventSource))
{
throw new IllegalArgumentException(
"Configuration must be derived from EventSource!");
}
((EventSource) src).addErrorListener(new ConfigurationErrorListener()
{
public void configurationError(ConfigurationErrorEvent event)
{
// Throw a runtime exception
throw new ConfigurationRuntimeException(event.getCause());