Author: kostat
Date: 2007-05-15 02:38:13 -0400 (Tue, 15 May 2007)
New Revision: 77390
Modified:
trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs
Log:
correct hierarchy for the exception for 2.0 profile
Modified: trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs
2007-05-15 05:50:19 UTC (rev 77389)
+++ trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs
2007-05-15 06:38:13 UTC (rev 77390)
@@ -45,7 +45,34 @@
* is not supported.
* 2. Method "void GetObjectData(...,...)" is not supported (serialization)
*/
+#if NET_2_0
+ public sealed class OleDbException : AbstractDbException
+ {
+ internal OleDbException (Exception cause, OleDbConnection
connection) : base (cause, connection) { }
+ internal OleDbException (SQLException cause, OleDbConnection
connection) : base (cause, connection) { }
+
+ internal OleDbException (string message, SQLException cause,
OleDbConnection connection) : base (message, cause, connection) { }
+
+ protected override AbstractDbErrorCollection DbErrors {
+ get {
+ return Errors;
+ }
+ }
+
+ public OleDbErrorCollection Errors {
+ get {
+ return new OleDbErrorCollection (_cause,
_connection);
+ }
+ }
+
+ public override int ErrorCode {
+ get {
+ return DbErrorCode;
+ }
+ }
+ }
+#else
public sealed class OleDbException :
System.Runtime.InteropServices.ExternalException
{
private class OleDbExceptionImpl : AbstractDbException {
@@ -132,4 +159,5 @@
}
}
+#endif
}
\ No newline at end of file
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs
2007-05-15 05:50:19 UTC (rev 77389)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs
2007-05-15 06:38:13 UTC (rev 77390)
@@ -43,7 +43,13 @@
* 2. Method "void GetObjectData(...,...)" is not supported
(serialization)
*/
- public abstract class AbstractDbException : System.SystemException {
+ public abstract class AbstractDbException :
+#if NET_2_0
+ DbException
+#else
+ System.SystemException
+#endif
+ {
protected SQLException _cause;
protected AbstractDBConnection _connection;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches