summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-01-21 20:27:57 +0000
committersr55 <[email protected]>2014-01-21 20:27:57 +0000
commit1c5cdd2e5767b3b25df9da740034e1f05a43d271 (patch)
treed6230a366fdb4785faa69974efa3e3a6afb5b713 /win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
parent675678a7157fac5c8ad6a69edd21fbf33d263c08 (diff)
WinGui: Make the Preset Plist importer a bit more robust by checking versions and automatically falling back to a value for invalid key/value pairs from old versions.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5988 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
index cc7dfc43e..45988ba60 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
@@ -14,6 +14,7 @@ namespace HandBrake.ApplicationServices.Utilities
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
+ using System.Diagnostics;
using System.Linq;
using System.Reflection;
@@ -91,7 +92,9 @@ namespace HandBrake.ApplicationServices.Utilities
}
}
- throw new ArgumentOutOfRangeException("The Description for the enum was not recognized.");
+ Debug.WriteLine("EnumHelper.GetValue: The Description for the enum was not recognized: " + description);
+
+ return default(T);
}
/// <summary>