If expected connection string entry is missing at run-time the type provider throws
System.NullReferenceException: Object reference not set to an instance of an object.
at FSharp.Configuration.AppSettingsTypeProvider.getConnectionString(String key) in
D:\git\FSharp.Configuration\src\FSharp.Configuration\AppSettingsProvider.fs:line 28
It would be nice if it can raise more meaningful error. Something like
raise <| System.KeyNotFoundException(sprintf "Cannot find name %s in section of config file." "AdventureWork")
If expected connection string entry is missing at run-time the type provider throws
System.NullReferenceException: Object reference not set to an instance of an object. at FSharp.Configuration.AppSettingsTypeProvider.getConnectionString(String key) in D:\git\FSharp.Configuration\src\FSharp.Configuration\AppSettingsProvider.fs:line 28
It would be nice if it can raise more meaningful error. Something like raise <| System.KeyNotFoundException(sprintf "Cannot find name %s in section of config file." "AdventureWork")
I do similar thing in FSharp.Data.SqlClient https://github.com/fsprojects/FSharp.Data.SqlClient/blob/master/src/SqlClient/Configuration.fs#L88