Merge pull request #163 from sidias/master

Error Handling
application-manager-new
Ruwan 8 years ago
commit 94cafd0346

@ -59,11 +59,11 @@ public class PushSystemUsage {
System.out.println(output);
JSONObject outputjson= new JSONObject(output);
if (response.getStatus() != 200 || outputjson ==null || !outputjson.getBoolean("success")) {
throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
// throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
}
}
catch (Exception e) {
throw e;
// throw e;
}
}
}

@ -100,12 +100,12 @@ public class JavaApp {
devicetoken = outputJson.getString("accessToken");
devicerefreshtoken = outputJson.getString("refreshToken");
if (response.getStatus() != 200) {
throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
// throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
}
config.SaveRegistration(spec, devicetoken, devicerefreshtoken);
} catch (Exception e) {
//e.printStackTrace();
throw e;
//throw e;
}
}

Loading…
Cancel
Save