InputStream is = null;
try {
is = new FileInputStream(rulesFileName);
} catch(IOException ioe) {
throw new PluginException(
"Unable to process file [" + rulesFileName + "]", ioe);
}
try {
RuleLoader loader = new LoaderFromStream(is);
return loader;
} catch(Exception e) {
throw new PluginException(
"Unable to load xmlrules from file [" +
rulesFileName + "]", e);
} finally {
try {
is.close();
} catch(java.io.IOException ioe) {
throw new PluginException(
"Unable to close stream for file [" +
rulesFileName + "]", ioe);
}
}
}