final String[] args = arguments.split("\\s+");
getLog().info("batik: args = " + Arrays.toString(args));
final Main main = new Main(args) {
@Override
public boolean proceedOnSourceTranscodingFailure(
final SVGConverterSource source, final File dest,
final String errorCode) {
super.proceedOnSourceTranscodingFailure(source, dest,
errorCode);
final String message = "batik: convert failed";
getLog().error(message);
throw new RuntimeException(message);
}
@Override
public void validateConverterConfig(final SVGConverter c) {
@SuppressWarnings("unchecked")
final List<String> expandedSources = c.getSources();
if ((expandedSources == null)
|| (expandedSources.size() < 1)) {
getLog().info(USAGE);
final String message = "batik: invalid config";
getLog().error(message);
throw new RuntimeException(message);
}
}
};
main.execute();
} catch (final Throwable exception) {
final String help = "http://xmlgraphics.apache.org/batik/tools/rasterizer.html";