@@ -57,7 +57,9 @@ private static Error ToErrorModelInternal(Exception exception, ExceptionlessClie
5757 PropertyInfo info = type . GetProperty ( "HResult" , BindingFlags . Public | BindingFlags . Instance ) ;
5858 if ( info != null )
5959 error . Code = info . GetValue ( exception , null ) . ToString ( ) ;
60- } catch ( Exception ) { }
60+ } catch ( Exception ex ) {
61+ log . Error ( typeof ( ExceptionlessClient ) , ex , "Error populating HResult Code: " + ex . Message ) ;
62+ }
6163
6264#if NET45
6365 try {
@@ -93,7 +95,9 @@ private static Error ToErrorModelInternal(Exception exception, ExceptionlessClie
9395 var extraProperties = type . GetPublicProperties ( ) . Where ( p => ! p . Name . AnyWildcardMatches ( exclusions , true ) ) . ToDictionary ( p => p . Name , p => {
9496 try {
9597 return p . GetValue ( exception , null ) ;
96- } catch { }
98+ } catch ( Exception ex ) {
99+ log . Error ( typeof ( ExceptionlessClient ) , ex , String . Format ( "Error getting extra exception property {0} value: {1}" , p . Name , ex . Message ) ) ;
100+ }
97101 return null ;
98102 } ) ;
99103
@@ -107,7 +111,9 @@ private static Error ToErrorModelInternal(Exception exception, ExceptionlessClie
107111 MaxDepthToSerialize = 5
108112 } , client ) ;
109113 }
110- } catch { }
114+ } catch ( Exception ex ) {
115+ log . Error ( typeof ( ExceptionlessClient ) , ex , "Error populating extra exception properties: " + ex . Message ) ;
116+ }
111117
112118 if ( exception . InnerException != null )
113119 error . Inner = ToErrorModelInternal ( exception . InnerException , client , true ) ;
@@ -164,7 +170,9 @@ internal static ModuleCollection GetLoadedModules(IExceptionlessLog log, bool in
164170 var attrs = assembly . GetCustomAttributes ( typeof ( System . CodeDom . Compiler . GeneratedCodeAttribute ) ) . ToList ( ) ;
165171 if ( attrs . Count > 0 )
166172 continue ;
167- } catch { }
173+ } catch ( Exception ex ) {
174+ log . Error ( typeof ( ExceptionlessClient ) , ex , "Error while checking if assembly " + assembly . FullName + " should be added to modules:" + ex . Message ) ;
175+ }
168176 }
169177
170178 var module = assembly . ToModuleInfo ( ) ;
@@ -185,10 +193,15 @@ private static void PopulateStackTrace(this Error error, Error root, Exception e
185193 try {
186194 var st = new EnhancedStackTrace ( exception ) ;
187195 frames = st . GetFrames ( ) ;
188- } catch { }
196+ }
197+ catch ( Exception ex ) {
198+ log . Error ( typeof ( ExceptionlessClient ) , ex , "Error getting stack frames: " + ex . Message ) ;
199+ }
189200
190- if ( frames == null )
201+ if ( frames == null || frames . Length == 0 ) {
202+ log . Info ( typeof ( ExceptionlessClient ) , "Error " + error . Message + " contained no stack frames" ) ;
191203 return ;
204+ }
192205
193206 foreach ( StackFrame frame in frames ) {
194207 var stackFrame = new Models . Data . StackFrame {
0 commit comments