Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Tag Helpers: Replace customer facing Debug.Assert's with parse errors. #174

Closed
NTaylorMullen opened this issue Oct 1, 2014 · 1 comment

Comments

@NTaylorMullen
Copy link
Contributor

There's 1 Debug.Assert that is customer facing (linked below) that we need to replace with a parser error to not confuse the user. There may be more than just one customer facing Debug.Assert that we should address. We will revisit each of these exceptions and implement correct behavior when we have time.

The Debug.Assert that I'm referring to is: https://github.com/aspnet/Razor/blob/TagHelpersFeature/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperParseTreeRewriter.cs#L32

This will explode when a user has malformed TagHelpers because it's not supported yet but will be fixed once we get #104 in. For now lets create a parser error so we don't spam users with Debug.Asserts just because they didn't right accurate HTML that happen to be tag helpers.

@NTaylorMullen NTaylorMullen self-assigned this Oct 1, 2014
@NTaylorMullen NTaylorMullen added this to the 4.0.0-beta1 milestone Oct 1, 2014
@NTaylorMullen NTaylorMullen changed the title Tag Helpers: Replace customer facing Debug.Assert's with exceptions. Tag Helpers: Replace customer facing Debug.Assert's with parse errors. Oct 5, 2014
NTaylorMullen added a commit that referenced this issue Oct 5, 2014
- Replaced customer facing Debug.Assert with a new error mechanism to surface errors to GenerateCode callers.
- The new mechanism is a general purpose way for ISyntaxTreeRewriters to add errors to the parsing phase.

#174
NTaylorMullen added a commit that referenced this issue Oct 5, 2014
- Replaced customer facing Debug.Assert with a new error mechanism to surface errors to GenerateCode callers.
- The new mechanism is a general purpose way for ISyntaxTreeRewriters to add errors to the parsing phase.

#174
NTaylorMullen added a commit that referenced this issue Oct 8, 2014
- Replaced customer facing Debug.Assert with a new error mechanism to surface errors to GenerateCode callers.
- The new mechanism is a general purpose way for ISyntaxTreeRewriters to add errors to the parsing phase.

#174
@NTaylorMullen
Copy link
Contributor Author

74974d3

NTaylorMullen added a commit that referenced this issue Oct 9, 2014
- Replaced customer facing Debug.Assert with a new error mechanism to surface errors to GenerateCode callers.
- The new mechanism is a general purpose way for ISyntaxTreeRewriters to add errors to the parsing phase.

#174
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant