Source:
<code>public static void main(String[] args) throws Exception { Options options = constructOptions(); Options helpOptions = constructHelpOptions(); CommandLineParser parser = new DefaultParser(); CommandLine cmd = parser.parse(helpOptions, args, true); if (cmd.hasOption("h")) { usage(options); return; } try { cmd = parser.parse(options, args); } catch (ParseException e) { usage(options); throw new RuntimeException("Error parsing command line options: ", e); } Boolean verbose = false; Level logLevel = Level.INFO; if (cmd.hasOption("v")) { logLevel = Level.ALL; verbose = true; } LoggingHelper.loggerInit(logLevel, false); String cluster = cmd.getOptionValue("cluster"); String role = cmd.getOptionValue("role"); String environ = cmd.getOptionValue("environment"); String heronHome = cmd.getOptionValue("heron_home"); String configPath = cmd.getOptionValue("config_path"); String overrideConfigFile = cmd.getOptionValue("override_config_file"); String releaseFile = cmd.getOptionValue("release_file"); String topologyPackage = cmd.getOptionValue("topology_package"); String topologyDefnFile = cmd.getOptionValue("topology_defn"); String topologyBinaryFile = cmd.getOptionValue("topology_bin"); TopologyAPI.Topology topology = TopologyUtils.getTopology(topologyDefnFile); Config config = Config.expand( Config.newBuilder() .putAll(defaultConfigs(heronHome, configPath, releaseFile)) .putAll(overrideConfigs(overrideConfigFile)) .putAll(commandLineConfigs(cluster, role, environ, verbose)) .putAll(topologyConfigs( topologyPackage, topologyBinaryFile, topologyDefnFile, topology)) .build()); LOG.fine("Static config loaded successfully"); LOG.fine(config.toString()); SubmitterMain submitterMain = new SubmitterMain(config, topology); try { submitterMain.submitTopology(); } catch (Exception e) { <START> System.out.println(e.getMessage()); <END> System.exit(100); } LOG.log(Level.FINE, "Topology {0} submitted successfully", topology.getName()); }</code><technical_language>want prefix message this, incase catching error a nice message. "Topology {0} submitted successfully", topology.getName()</technical_language>

Target:
public static void main(String[] args) throws Exception { Options options = constructOptions(); Options helpOptions = constructHelpOptions(); CommandLineParser parser = new DefaultParser(); CommandLine cmd = parser.parse(helpOptions, args, true); if (cmd.hasOption("h")) { usage(options); return; } try { cmd = parser.parse(options, args); } catch (ParseException e) { usage(options); throw new RuntimeException("Error parsing command line options: ", e); } Boolean verbose = false; Level logLevel = Level.INFO; if (cmd.hasOption("v")) { logLevel = Level.ALL; verbose = true; } LoggingHelper.loggerInit(logLevel, false); String cluster = cmd.getOptionValue("cluster"); String role = cmd.getOptionValue("role"); String environ = cmd.getOptionValue("environment"); String heronHome = cmd.getOptionValue("heron_home"); String configPath = cmd.getOptionValue("config_path"); String overrideConfigFile = cmd.getOptionValue("override_config_file"); String releaseFile = cmd.getOptionValue("release_file"); String topologyPackage = cmd.getOptionValue("topology_package"); String topologyDefnFile = cmd.getOptionValue("topology_defn"); String topologyBinaryFile = cmd.getOptionValue("topology_bin"); TopologyAPI.Topology topology = TopologyUtils.getTopology(topologyDefnFile); Config config = Config.expand( Config.newBuilder() .putAll(defaultConfigs(heronHome, configPath, releaseFile)) .putAll(overrideConfigs(overrideConfigFile)) .putAll(commandLineConfigs(cluster, role, environ, verbose)) .putAll(topologyConfigs( topologyPackage, topologyBinaryFile, topologyDefnFile, topology)) .build()); LOG.fine("Static config loaded successfully"); LOG.fine(config.toString()); SubmitterMain submitterMain = new SubmitterMain(config, topology); try { submitterMain.submitTopology(); } catch (Exception e) { LOG.log(Level.FINE, "Exception when submitting topology", e); System.out.println(e.getMessage()); System.exit(100); } LOG.log(Level.FINE, "Topology {0} submitted successfully", topology.getName()); }