context.put(getExceptionKey(), exception);
// Execute the specified command
try {
String catalogName = getCatalogName();
Catalog catalog = null;
if (catalogName == null) {
catalog = CatalogFactory.getInstance().getCatalog();
if (catalog == null) {
log.error("Cannot find default catalog");
throw new IllegalArgumentException
("Cannot find default catalog");
}
} else {
catalog = CatalogFactory.getInstance().getCatalog(catalogName);
if (catalog == null) {
log.error("Cannot find catalog '" + catalogName + "'");
throw new IllegalArgumentException
("Cannot find catalog '" + catalogName + "'");
}
}
String exceptionCommand = getExceptionCommand();
if (exceptionCommand == null) {
log.error("No exceptionCommand property specified");
throw new IllegalStateException
("No exceptionCommand property specfied");
}
Command command = catalog.getCommand(exceptionCommand);
if (command == null) {
log.error("Cannot find exceptionCommand '" +
exceptionCommand + "'");
throw new IllegalStateException
("Cannot find exceptionCommand '" +