Skip to content

Commit

Permalink
Add Logging
Browse files Browse the repository at this point in the history
Right now having errors at the `GetOSMUser` function.
@james2432
  • Loading branch information
DenisCarriere committed Sep 1, 2016
1 parent c95b5e0 commit 63e444f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions OSVUploadr/src/main/java/ca/osmcanada/osvuploadr/JPMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -585,27 +585,29 @@ private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
String path = ca.osmcanada.osvuploadr.JFMain.class.getProtectionDomain().getCodeSource().getLocation().getPath();
String decodedPath="";
String decodedPath = "";
try{
decodedPath=new File(URLDecoder.decode(path, "UTF-8")).getParentFile().getPath();
decodedPath = new File(URLDecoder.decode(path, "UTF-8")).getParentFile().getPath();
}
catch(Exception ex)
{
Logger.getLogger(JPMain.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(JPMain.class.getName()).log(Level.SEVERE, "decodePath", ex);
}
File id = new File(decodedPath+"/id_file.txt");
File id = new File(decodedPath + "/id_file.txt");
String usr="";
if(!id.exists())
{
try{
String user_id=GetOSMUser();
System.out.println("GetOSMUser");
String user_id = GetOSMUser();
Path targetPath = Paths.get("./id_file.txt");
byte[] bytes = user_id.getBytes(StandardCharsets.UTF_8);
Files.write(targetPath, bytes, StandardOpenOption.CREATE);
usr = user_id;
}
catch(Exception ex)
{
Logger.getLogger(JPMain.class.getName()).log(Level.SEVERE, "GetOSMUser", ex);
}
}
else
Expand All @@ -617,7 +619,9 @@ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
}
}
catch(Exception ex)
{}
{
Logger.getLogger(JPMain.class.getName()).log(Level.SEVERE, "readAllLines", ex);
}
}

//Start processing list
Expand Down

0 comments on commit 63e444f

Please sign in to comment.