Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/8.0.400.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Allow #nowarn to support the FS prefix on error codes to disable warnings ([Issue #17206](https://github.com/dotnet/fsharp/issues/16447), [PR #17209](https://github.com/dotnet/fsharp/pull/17209))
* Allow ParsedHashDirectives to have argument types other than strings ([Issue #17240](https://github.com/dotnet/fsharp/issues/16447), [PR #17209](https://github.com/dotnet/fsharp/pull/17209))
* Parser: better recovery for unfinished patterns ([PR #17231](https://github.com/dotnet/fsharp/pull/17231))
* Expose inner exception information of TypeProviders to help diagnostics in IDE ([PR #17251](https://github.com/dotnet/fsharp/pull/17251))
* Parser: recover on empty match clause ([PR #17233](https://github.com/dotnet/fsharp/pull/17233))

### Changed
Expand Down
5 changes: 3 additions & 2 deletions src/Compiler/TypedTree/tainted.fs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ type internal Tainted<'T> (context: TaintedContext, value: 'T) =
| :? TypeProviderError -> reraise()
| :? AggregateException as ae ->
let errNum,_ = FSComp.SR.etProviderError("", "")
let messages = [for e in ae.InnerExceptions -> e.Message]
let messages = [for e in ae.InnerExceptions -> if isNull e.InnerException then e.Message else (e.Message + ": " + e.GetBaseException().Message)]
raise <| TypeProviderError(errNum, this.TypeProviderDesignation, range, messages)
| e ->
let errNum,_ = FSComp.SR.etProviderError("", "")
raise <| TypeProviderError((errNum, e.Message), this.TypeProviderDesignation, range)
let error = if isNull e.InnerException then e.Message else (e.Message + ": " + e.GetBaseException().Message)
raise <| TypeProviderError((errNum, error), this.TypeProviderDesignation, range)

member _.TypeProvider = Tainted<_>(context, context.TypeProvider)

Expand Down