Tweaks error messages, as file path shows on exr

This commit is contained in:
James Quinley
2022-10-13 21:06:10 -07:00
parent 9968d404e2
commit 274db7ddf7
2 changed files with 21 additions and 22 deletions

View File

@ -1413,13 +1413,12 @@ public class delegationServices {
String policyDocument;
try
{
File homedir = new File(System.getProperty("user.home"));
policyDocument = Files.readString(Path.of(homedir + "/ocs/policy/launcher/legal/eula.txt"));
policyDocument = Files.readString(Path.of(System.getProperty("user.home") + "/ocs/policy/launcher/legal/eula.txt"));
}
catch (Exception EXR)
{
System.out.println("Unable to pull file, fallback.");
policyDocument = "Policy file does not exist on server. (Unable to find file in /ocs/policy/launcher/legal/accountagreement.txt) This is an issue on our end. Error ID: " + EXR;
policyDocument = "Policy file does not exist on server. This is an issue on our end. Error ID: " + EXR;
}
BasicDBObject updateQuery = new BasicDBObject();
@ -1444,13 +1443,13 @@ public class delegationServices {
String policyDocument;
try
{
File homedir = new File(System.getProperty("user.home"));
policyDocument = Files.readString(Path.of(homedir + "/ocs/policy/launcher/legal/eula.txt"));
// File homedir = new File(System.getProperty("user.home"));
policyDocument = Files.readString(Path.of(System.getProperty("user.home") + "/ocs/policy/launcher/legal/eula.txt"));
}
catch (Exception EXR)
{
System.out.println("Unable to pull file, fallback.");
policyDocument = "Policy file does not exist on server. (Unable to find file in /ocs/policy/launcher/legal/accountagreement.txt) This is an issue on our end. Error ID: " + EXR;
policyDocument = "Policy file does not exist on server. This is an issue on our end. Error ID: " + EXR;
}
BasicDBObject updateQuery = new BasicDBObject();