Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Feature: Razor should throw a specific error when @helper directive is used in a host that doesn't support it [57]

$
0
0
When the Razor Host configuration doesn't have the necessary configuration to generate C# code for an @helper directive, it should throw out a specific error indicating that @helper is not supported (possibly with information for the developer on how to support it).

As a specific example, if you try to use @helper in a Host which does not have GeneratedClassContext.WriteToMethodName set, it will render out invalid C# that will cause obscure compiler errors. Instead, we should report a clearer error like "@helper is not supported because this host does not define the WriteTo method"

This is a low-pri fix, there is no actual bug in the code, it's more something that could be reported to the user better.
Comments: Currently all known hosts support the @helper directive, so the value of fixing this is rather low and now worth the effort.

Viewing all articles
Browse latest Browse all 7215

Trending Articles