public static void main(String[] args) { try { JApiCli jApiCli = new JApiCli(); jApiCli.run(args); } catch (JApiCmpException e) { LOGGER.log(Level.FINE, CAUGHT_EXCEPTION + e.getLocalizedMessage(), e); if (e.getReason() != JApiCmpException.Reason.NormalTermination) { System.err.println("E: " + e.getMessage()); System.out.println(USE_HELP_OR_H_FOR_MORE_INFORMATION); System.exit(1); } } catch (Exception e) { LOGGER.log(Level.FINE, CAUGHT_EXCEPTION + e.getLocalizedMessage(), e); System.err.println(String.format("Execution of %s failed: %s", JApiCmp.class.getSimpleName(), e.getMessage())); e.printStackTrace(); System.exit(1); } } }
public static void main(String[] args) { try { JApiCli jApiCli = new JApiCli(); jApiCli.run(args); } catch (JApiCmpException e) { LOGGER.log(Level.FINE, CAUGHT_EXCEPTION + e.getLocalizedMessage(), e); if (e.getReason() != JApiCmpException.Reason.NormalTermination) { System.err.println("E: " + e.getMessage()); System.out.println(USE_HELP_OR_H_FOR_MORE_INFORMATION); System.exit(1); } } catch (Exception e) { LOGGER.log(Level.FINE, CAUGHT_EXCEPTION + e.getLocalizedMessage(), e); System.err.println(String.format("Execution of %s failed: %s", JApiCmp.class.getSimpleName(), e.getMessage())); e.printStackTrace(); System.exit(1); } } }
} catch (JApiCmpException e) { if (e.getReason() == JApiCmpException.Reason.IncompatibleChange) { throw new MojoFailureException(e.getMessage()); } else { throw new MojoExecutionException("Error while checking for incompatible changes", e);
} catch (JApiCmpException e) { if (e.getReason() == JApiCmpException.Reason.IncompatibleChange) { throw new BuildException(e.getMessage());