Commit cbb5b90
authored
Make Exception.StackTrace resilient to missing attribute assemblies (#48535)
A customer has reported a problem when they could not get stack trace
from an exception that they needed to log, because one of the methods on
the stack or its defining type had an attribute from an assembly that
was missing.
This change fixes that by ignoring exceptions in attempts to get
StackTraceHiddenAttribute, preferring to err on the side of getting a
stack frame that was marked as hidden in the stack trace rather than
not getting any stack trace at all.1 parent e912151 commit cbb5b90
File tree
1 file changed
+19
-10
lines changed- src/libraries/System.Private.CoreLib/src/System/Diagnostics
1 file changed
+19
-10
lines changedLines changed: 19 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
362 | 364 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
367 | 375 | | |
368 | | - | |
369 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
370 | 379 | | |
371 | 380 | | |
372 | 381 | | |
| |||
0 commit comments