Changeset 1454
- Timestamp:
- 1/5/2010 2:48:26 AM (3 years ago)
- File:
-
- 1 edited
-
branches/eraser6/BlackBox/Eraser.Util/BlackBox.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/BlackBox/Eraser.Util/BlackBox.cs
r1427 r1454 258 258 259 259 /// <summary> 260 /// Creates a new BlackBox report based on the exception provided. 261 /// </summary> 262 /// <param name="e">The exception which triggered this dump.</param> 263 public void CreateReport(Exception e) 264 { 265 if (e == null) 266 throw new ArgumentNullException("e"); 267 268 //Generate a unique identifier for this report. 269 string crashName = DateTime.Now.ToString("yyyyMMdd HHmmss.FFF"); 270 string currentCrashReport = Path.Combine(CrashReportsPath, crashName); 271 Directory.CreateDirectory(currentCrashReport); 272 273 //Write a memory dump to the folder 274 WriteMemoryDump(currentCrashReport, e); 275 276 //Then write a user-readable summary 277 WriteDebugLog(currentCrashReport, e); 278 279 //Take a screenshot 280 WriteScreenshot(currentCrashReport); 281 } 282 283 /// <summary> 260 284 /// Enumerates the list of crash dumps waiting for upload. 261 285 /// </summary> … … 286 310 private void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) 287 311 { 288 //Generate a unique identifier for this report. 289 string crashName = DateTime.Now.ToString("yyyyMMdd HHmmss.FFF"); 290 string currentCrashReport = Path.Combine(CrashReportsPath, crashName); 291 Directory.CreateDirectory(currentCrashReport); 292 293 //Write a memory dump to the folder 294 Exception exception = (e.ExceptionObject as Exception); 295 WriteMemoryDump(currentCrashReport, exception); 296 297 //Then write a user-readable summary 298 WriteDebugLog(currentCrashReport, exception); 299 300 //Take a screenshot 301 WriteScreenshot(currentCrashReport); 312 CreateReport(e.ExceptionObject as Exception); 302 313 } 303 314
Note: See TracChangeset
for help on using the changeset viewer.
