* Makefile ($(build_lib)): Make CYCLIC_DEP_FILES depend on this.
[mono.git] / mcs / class / System.Data.OracleClient / System.Data.OracleClient.Oci / OciEnvironmentHandle.cs
index 663fe51f6e15d3d0cdf7b6058c87ad975c8574fe..67367ae8c8699dadaf1c57522f9bae4886f540a5 100644 (file)
@@ -50,28 +50,7 @@ namespace System.Data.OracleClient.Oci {
 
                public OciErrorInfo HandleError ()
                {
-                       int errbufSize = 512;
-                       IntPtr errbuf = Marshal.AllocHGlobal (errbufSize);
-
-                       OciErrorInfo info;
-                       info.ErrorCode = 0;
-                       info.ErrorMessage = String.Empty;
-
-                       OciCalls.OCIErrorGet (Handle,
-                                       1,
-                                       IntPtr.Zero,
-                                       out info.ErrorCode,
-                                       errbuf,
-                                       (uint) errbufSize,
-                                       OciHandleType.Environment);
-
-                       object err = Marshal.PtrToStringAnsi (errbuf);
-                       if (err != null) {
-                               string errmsg = (string) err;
-                               info.ErrorMessage = String.Copy (errmsg);
-                               Marshal.FreeHGlobal (errbuf);
-                       }
-
+                       OciErrorInfo info = OciErrorHandle.HandleError (this);
                        return info;
                }