/[gr2lib]/trunk/gr2lib/core/helpers/Helpers.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/helpers/Helpers.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib/core/helpers/Helpers.cs	2010/07/17 13:53:49	101
+++ trunk/gr2lib/core/helpers/Helpers.cs	2010/07/17 13:54:18	102
@@ -23,10 +23,12 @@
 
                 return _object_implementation_;
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(T);
             }
         }
@@ -37,10 +39,12 @@
             {
                 return ReadArrayFromMemory<T>(array.Count, array.Pointer);
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(T[]);
             }
         }
@@ -57,10 +61,12 @@
                 }
                 return rez;
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(T[]);
             }
         }
@@ -71,10 +77,12 @@
             {
                 return ReadPtrArrayFromMemory<T>(array.Count, array.Pointer);
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(IntPtr[]);
             }
         }
@@ -91,10 +99,12 @@
                 }
                 return rez;
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(IntPtr[]);
             }
         }
@@ -105,10 +115,12 @@
             {
                 return ReadArrayFromMemory(array.Count, array.Pointer);
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(IntPtr[]);
             }
         }
@@ -124,10 +136,12 @@
                 }
                 return rez;
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return default(IntPtr[]);
             }
         }
@@ -190,10 +204,12 @@
                 size = Marshal.SizeOf(typeof(T));
                 return size;
             }
-            catch (Exception ex)
+            catch
             {
                 StackTrace st = new StackTrace(true);
-                Console.WriteLine(st.ToString() + "\n\n" + "Stack Trace: \n" + ex.ToString());
+#if  ENABLE_EXCEPTION_OUTPUT_TO_CONSOLE
+                Console.WriteLine(st.ToString());
+#endif
                 return 0;
             }
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22