ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/gr2lib/trunk/gr2lib/core/coreclasses/header/granny_header.cs
(Generate patch)

Comparing trunk/gr2lib/core/coreclasses/header/granny_header.cs (file contents):
Revision 102 by william, Sat Jul 17 13:54:18 2010 UTC vs.
Revision 106 by william, Sat Jul 17 14:52:37 2010 UTC

--- trunk/gr2lib/core/coreclasses/header/granny_header.cs	2010/07/17 13:54:18	102
+++ trunk/gr2lib/core/coreclasses/header/granny_header.cs	2010/07/17 14:52:37	106
@@ -6,6 +6,7 @@ using System.Text;
 using gr2lib.core.interfaces;
 using gr2lib.core.helpers;
 using System.Diagnostics;
+using gr2lib.core.exceptions;
 
 namespace gr2lib.core.coreclasses.header
 {
@@ -45,11 +46,11 @@ namespace gr2lib.core.coreclasses.header
                 managed.NativePointer = pointer;
                 return managed;
             }
-            catch
+            catch (Exception ex)
             {
                 StackTrace st = new StackTrace(true);
 #if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
-                Console.WriteLine(st.ToString());
+                Granny2ExceptionWriter.WriteToConsole(ex,st);
 #endif
                 return default(granny_header);
             }
@@ -88,11 +89,11 @@ namespace gr2lib.core.coreclasses.header
                 //process header
                 return managed;
             }
-            catch
+            catch (Exception ex)
             {
                 StackTrace st = new StackTrace(true);
 #if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
-                Console.WriteLine(st.ToString());
+                Granny2ExceptionWriter.WriteToConsole(ex,st);
 #endif
                 return default(granny_header);
             }