dotnet / dotnet/fsharp

Better errors message when exception raised in ProvidedTypeDefinition.AddMembersDelayed

Open
#710 0 comments 0 reactions 0 assignees View on GitHub
Area-TypeProviders Bug Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

When exception raised inside delayed closure a user gets obscure message:
"No constructors are available for the type ..."
This hides real error message and makes hard to diagnose issues.

Same applies to a case of adding single member in delayed fashion ProvidedTypeDefinition.AddMemberDelayed

repro here
https://github.com/dmitry-a-morozov/Sandbox/tree/master/ExnInDelayedCtorErasedTypes

From practical perspective I deal with this problem in SqlProgrammabilityProvider.
when user encounters stored procedure with an error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.