-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed
raise
to calling Reraise()
extension method to preserve t…
…he call stack
- Loading branch information
1 parent
eb91858
commit b836eed
Showing
4 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[<AutoOpen>] | ||
[<CompilationRepresentation (CompilationRepresentationFlags.ModuleSuffix)>] | ||
module System.Exception | ||
|
||
open System | ||
open System.Diagnostics | ||
open System.Runtime.ExceptionServices | ||
|
||
// Useful for reraising exceptions under an async {...} and task {...} contexts | ||
// See this for more details: https://github.com/fsharp/fslang-suggestions/issues/660 | ||
type internal Exception with | ||
|
||
[<DebuggerHidden>] | ||
member __.Reraise () = | ||
(ExceptionDispatchInfo.Capture __).Throw () | ||
Unchecked.defaultof<_> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters