Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- DerbyNow() throws IOException {
- // create socket connection
- socket = new EventSocket(new Socket(DERBY_NOW_HOST, DERBY_NOW_PORT)) // EventSocket throws IOException as well
- ...
- try {
- DerbyNow derbyNow = new DerbyNow();
- setDerbyNow(derbyNow);
- } catch (IOException e) {
- Log.bad("error while setting up Derby Now: ", e);
- }
- Error:(382, 19) java: exception java.io.IOException is never thrown in body of corresponding try statement
- apply plugin: 'java'
- apply plugin: 'groovy'
- ...
- repositories {
- mavenCentral()
- mavenLocal()
- ...
- }
- ...
- dependencies {
- compile 'org.codehaus.groovy:groovy-all:2.3.11'
- ...
- }
- try {
- DerbyNow derbyNow = new DerbyNow();
- setDerbyNow(derbyNow);
- } catch (Exception e) {
- if (e instanceOf IOException) {
- Log.bad("error while setting up Derby Now: ", e);
- } else {
- throw e;
- }
- }
Add Comment
Please, Sign In to add comment