diff --git a/ARKBreedingStats/FileService.cs b/ARKBreedingStats/FileService.cs index 405e705c..5c3edff0 100644 --- a/ARKBreedingStats/FileService.cs +++ b/ARKBreedingStats/FileService.cs @@ -118,7 +118,7 @@ public static bool LoadJsonFile(string filePath, out T data, out string error if (data != null) return true; - errorMessage = $"File\n{Path.GetFullPath(filePath)}\n contains no readable data."; + errorMessage = $"File\n{Path.GetFullPath(filePath)}\ncontains no readable data."; return false; } } diff --git a/ARKBreedingStats/values/ValuesFile.cs b/ARKBreedingStats/values/ValuesFile.cs index f0af3def..f7e4b5ca 100644 --- a/ARKBreedingStats/values/ValuesFile.cs +++ b/ARKBreedingStats/values/ValuesFile.cs @@ -136,6 +136,12 @@ protected static bool TryLoadValuesFile(string filePath, bool setModFileName, bo if (throwExceptionOnFail) throw new FormatException(errorMessage); } + catch (FileLoadException ex) + { + errorMessage = ex.Message; + if (throwExceptionOnFail) + throw; + } return false; } }