Skip to content

Commit d388b1d

Browse files
committed
more logging
1 parent de5a105 commit d388b1d

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

FlashpointSecurePlayer/EnvironmentVariables.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,20 @@ private string GetValue(EnvironmentVariablesElement environmentVariablesElement)
6161

6262
try {
6363
regex = new Regex(environmentVariablesElement.Find);
64-
} catch (ArgumentException) {
64+
} catch (Exception ex) {
65+
LogExceptionToLauncher(ex);
6566
throw new InvalidEnvironmentVariablesException("The Regex Pattern \"" + environmentVariablesElement.Find + "\" is invalid.");
6667
}
6768

6869
try {
6970
value = regex.Replace(value, environmentVariablesElement.Replace);
70-
} catch (ArgumentNullException) {
71+
} catch (RegexMatchTimeoutException ex) {
72+
LogExceptionToLauncher(ex);
73+
throw new InvalidEnvironmentVariablesException("The Regex Match timed out.");
74+
} catch (Exception ex) {
7175
// value was not defined
7276
// fail silently
73-
} catch (RegexMatchTimeoutException) {
74-
throw new InvalidEnvironmentVariablesException("The Regex Match timed out.");
77+
LogExceptionToLauncher(ex);
7578
}
7679
return value;
7780
}

FlashpointSecurePlayer/Shared.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,12 +2249,15 @@ public static async Task<Uri> DownloadAsync(string name) {
22492249
}
22502250
} catch (Exceptions.DownloadFailedException) {
22512251
throw;
2252-
} catch (ArgumentException) {
2253-
throw new Exceptions.DownloadFailedException("The download failed because the download name \"" + name + "\" is invalid.");
2254-
} catch (HttpRequestException) {
2252+
} catch (HttpRequestException ex) {
2253+
Exceptions.LogExceptionToLauncher(ex);
22552254
throw new Exceptions.DownloadFailedException("The download failed because the HTTP Request is invalid.");
2256-
} catch (InvalidOperationException) {
2255+
} catch (InvalidOperationException ex) {
2256+
Exceptions.LogExceptionToLauncher(ex);
22572257
throw new Exceptions.DownloadFailedException("The download failed because the address \"" + name + "\" was not understood.");
2258+
} catch (Exception ex) {
2259+
Exceptions.LogExceptionToLauncher(ex);
2260+
throw new Exceptions.DownloadFailedException("The download failed because the download name \"" + name + "\" is invalid.");
22582261
} finally {
22592262
downloadSemaphoreSlim.Release();
22602263
}
@@ -2364,10 +2367,12 @@ private static Configuration GetEXEConfiguration(bool create, string name) {
23642367
//throw new ConfigurationErrorsException("The EXE Configuration failed to download.");
23652368
} catch (ConfigurationErrorsException) {
23662369
// fail silently
2367-
} catch (IOException) {
2370+
} catch (IOException ex2) {
2371+
Exceptions.LogExceptionToLauncher(ex2);
23682372
throw new ConfigurationErrorsException("The EXE Configuration is in use.");
23692373
}
2370-
} catch (IOException) {
2374+
} catch (IOException ex2) {
2375+
Exceptions.LogExceptionToLauncher(ex2);
23712376
throw new ConfigurationErrorsException("The EXE Configuration is in use.");
23722377
}
23732378

0 commit comments

Comments
 (0)