05-29-2006 11:24 AM
import org.alfresco.tools.Import;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* This class is a "wrapper" to:
* - log errors using log4j
* - return a "exit code" different from 0 when one error occurs.
*/
public final class ImportWrapper
{
protected static Log logger = LogFactory.getLog(ImportWrapper.class);
public static void main(String[] args)
{
logger.debug("Start of import");
int exitCode = 1;
try
{
Import.main(args);
// OK
exitCode = 0;
}
catch (Throwable t)
{
logger.error("ERROR DURING IMPORT:" + t.getMessage(), t);
}
logger.debug("End of import - exitCode=" + exitCode);
System.exit(exitCode);
}
}
05-30-2006 01:07 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.