Updated exception message to include capability id.

This commit is contained in:
soukoku
2015-03-23 07:35:34 -04:00
parent b5cd2f6e17
commit abd3c9c65c
3 changed files with 5 additions and 16 deletions

View File

@@ -75,7 +75,8 @@ namespace NTwain
ContainerType = capability.ContainerType, ContainerType = capability.ContainerType,
}.ReadRangeValue(baseAddr); }.ReadRangeValue(baseAddr);
default: default:
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.CapHasBadContainer, capability.ContainerType), "capability"); throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
Resources.CapHasBadContainer, capability.Capability, capability.ContainerType), "capability");
} }
} }
finally finally

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.34014 // Runtime Version:4.0.30319.0
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -79,7 +79,7 @@ namespace NTwain.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Capability has invalid container type {0}.. /// Looks up a localized string similar to Capability {0} has invalid container type {1}..
/// </summary> /// </summary>
internal static string CapHasBadContainer { internal static string CapHasBadContainer {
get { get {
@@ -87,15 +87,6 @@ namespace NTwain.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Capability contains no data..
/// </summary>
internal static string CapHasNoData {
get {
return ResourceManager.GetString("CapHasNoData", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to The string value has exceeded the maximum length allowed.. /// Looks up a localized string similar to The string value has exceeded the maximum length allowed..
/// </summary> /// </summary>

View File

@@ -124,10 +124,7 @@
<value>Invalid value type for {0}.</value> <value>Invalid value type for {0}.</value>
</data> </data>
<data name="CapHasBadContainer" xml:space="preserve"> <data name="CapHasBadContainer" xml:space="preserve">
<value>Capability has invalid container type {0}.</value> <value>Capability {0} has invalid container type {1}.</value>
</data>
<data name="CapHasNoData" xml:space="preserve">
<value>Capability contains no data.</value>
</data> </data>
<data name="MaxStringLengthExceeded" xml:space="preserve"> <data name="MaxStringLengthExceeded" xml:space="preserve">
<value>The string value has exceeded the maximum length allowed.</value> <value>The string value has exceeded the maximum length allowed.</value>