Skip to content

Commit

Permalink
Add log messages to URLValidadorTask class
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescr committed Jul 22, 2021
1 parent 9b241ae commit b7e28bc
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/

public class URLValidatorTask extends AsyncTask<String, Integer, Boolean>{

public static final String TAG = "URLValidatorTask";

@Override
protected Boolean doInBackground(String... params) {
/*
Expand All @@ -31,6 +34,7 @@ protected Boolean doInBackground(String... params) {

protected boolean customLayoutsRepoValidator(String githubUsername, String repoName, String branchName){
String server_url = URLCreator.createTestURL(githubUsername, repoName, branchName);
Log.d(TAG, "Resource URL: " + server_url);
boolean status;
try {
URL url = new URL(server_url);
Expand All @@ -44,7 +48,8 @@ protected boolean customLayoutsRepoValidator(String githubUsername, String repoN
+ " " + httpConnection.getResponseMessage());
status = true;
} else{
Log.e(TAG, "The connection could not be established, server return: " + httpConnection.getResponseCode());
Log.e(TAG, "The connection could not be established, server return: " + httpConnection.getResponseCode()
+ " " + httpConnection.getResponseMessage());
status = false;
}
} catch (Exception e) {
Expand Down

0 comments on commit b7e28bc

Please sign in to comment.