Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2005-01-14 20:03:07 +0300
committerAtsushi Eno <atsushieno@gmail.com>2005-01-14 20:03:07 +0300
commitacd4da0ec66d9260a40901bd30378a893f64f429 (patch)
tree76b8c9ce787529594435dc6aa7c7b586778ec186 /mcs/class/System.Data/System.Data.Common/DataContainer.cs
parent303719101a027224d6ca22376d653e52ef85a55f (diff)
2005-01-14 Atsushi Enomoto <atsushi@ximian.com>
* DbDataPermissionAttribute.cs, PermissionHelper.cs : fixed some incompatible type of exception between 2.0 and 1.x. * DataContainer.cs : Wrap exceptions thrown by SetValue() within ArgumentException. * SqlClientPermissionTest.cs, SqlClientPermissionAttributeTest.cs: Fixed some incompatible type of exception between 2.0 and 1.1. * OleDbPermissionTest.cs, OleDbPermissionAttributeTest.cs: Fixed some incompatible type of exception between 2.0 and 1.1. * OdbcPermissionTest.cs, OdbcPermissionAttributeTest.cs: Fixed some incompatible type of exception between 2.0 and 1.1. * DBDataPermissionTest.cs, DBDataPermissionAttributeTest.cs: Fixed some incompatible type of exception between 2.0 and 1.1. svn path=/trunk/mcs/; revision=38945
Diffstat (limited to 'mcs/class/System.Data/System.Data.Common/DataContainer.cs')
-rw-r--r--mcs/class/System.Data/System.Data.Common/DataContainer.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
index ce73ea78491..42c74108b0c 100644
--- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs
+++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
@@ -218,7 +218,11 @@ namespace System.Data.Common
SetValue(index,(short)value);
}
else {
- SetValue(index,Convert.ToInt16(value));
+ try {
+ SetValue(index,Convert.ToInt16(value));
+ } catch (Exception ex) {
+ throw new ArgumentException (ex.Message, ex);
+ }
}
SetNull(index,value == null,isDbNull);
}