From 32a55bfdf8456d04d8f19ddba5daf8d8a6865717 Mon Sep 17 00:00:00 2001 From: Paul Sladen Date: Mon, 6 Apr 2009 05:50:03 +0300 Subject: [PATCH] * Print + try...except{} around path used in LoadOptions() (debugging) --- debian/changelog | 1 + openBVE/OpenBve/Interface.cs | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/debian/changelog b/debian/changelog index d5119c5..049efff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ openbve (1.0.2.0-0ubuntu1) unreleased; urgency=low * Fix case in manpage documentation for '~/.config/OpenBve/' * Add README.Debian covering Debian-centric patches * Update 'known-issues.txt' + * Print + try...except{} around path used in LoadOptions() (debugging) -- Paul Sladen Sun, 05 Apr 2009 12:33:10 +0000 diff --git a/openBVE/OpenBve/Interface.cs b/openBVE/OpenBve/Interface.cs index d5c1f74..3bb4622 100644 --- a/openBVE/OpenBve/Interface.cs +++ b/openBVE/OpenBve/Interface.cs @@ -412,10 +412,13 @@ namespace OpenBve { int i = Code.IndexOf("-", StringComparison.Ordinal); if (i > 0) { Code = Code.Substring(0, i); + try { + Console.Error.WriteLine("GetCorrectedFileName(\"" + Code + ".cfg\");"); File = GetCorrectedFileName(Code + ".cfg"); if (System.IO.File.Exists(File)) { CurrentOptions.LanguageCode = Code; } + } catch (Exception exp) { Console.Error.WriteLine(exp.Message); } } } } -- 1.6.0.4