Open dsshep opened 3 years ago
I am running into a similar problem during router initialization. The image shows the call stack from Visual Studio.
This is probably caused by the fact that the first formater is %s
and it eagerly matches the whole route, so then it can't match the second formatter.
Using the template here.
Changing the
Router.fs
to something like:Causes an exception on startup:
Exception thrown: 'System.NullReferenceException' in Unknown Module. Object reference not set to an instance of an object.
It doesn't seem to happen with a single format specifier, e.g.
getf "/%s" getName
would be fine.Although once the application has started the route will work. In VS on windows, this will be caught in the break mode window. On Mac (and probably Linux) this will cause dotnet to crash along with the debug session: