Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

JOSHUA-264 System.exit() calls are replaced by throw new RuntimeException() #13

Merged
merged 3 commits into from
May 26, 2016
Merged

JOSHUA-264 System.exit() calls are replaced by throw new RuntimeException() #13

merged 3 commits into from
May 26, 2016

Conversation

thammegowda
Copy link
Member

This PR replaces system exit calls with runtime exception

  • The error messages are preserved by passing them as message argument
  • the redundant catch blocks are replaced with compact catch blocks
  • The cause for exceptions are propagated to RuntimeException's cause where applicable

Note :

  • Some exit calls from main function are left untouched since they are most likely be invoked from CLI

@mjpost
Copy link
Contributor

mjpost commented May 16, 2016

I can't compile this — Are you using Ivy here?

@mjpost
Copy link
Contributor

mjpost commented May 16, 2016

Oh, I see, you are building off JOSHUA-252. We will need to merge that in with master first.

@thammegowda
Copy link
Member Author

This is based on Maven build.
Since the files are moved to new location in maven build, I branched off from JOSHUA-252 to avoid merge conflicts later time.

@mjpost
Copy link
Contributor

mjpost commented May 16, 2016

Can you describe the maven build process? What version do you use, and what command do you type?

@thammegowda
Copy link
Member Author

My maven version

$ mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-32-generic", arch: "amd64", family: "unix"

To compile :

mvn clean compile

To package

mvn clean package # this fails if there are test failures
mvn clean package -DskipTests # to skip tests

To run main method in a class:

mvn compile exec:java -Dexec.mainClass=org.apache.joshua.decoder.JoshuaDecoder

@thammegowda
Copy link
Member Author

@mjpost Added maven-assembly-plugin to make the build cycle easy: #14

@lewismc
Copy link
Member

lewismc commented May 17, 2016

Nice, I've been working on the eats for the last hour or so, so I'll update feature branch once this is done.
@matt did you merge this PR into feature branch? If so then thanks very much.

@KellenSunderland
Copy link
Contributor

Hey Thamme, thanks for the great PR. Haven't checked the build yet myself but the commit looks good to me.

@asfgit asfgit merged commit 02f3ef1 into apache:JOSHUA-252 May 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants