Improve the Stack Trace when an HTML Parsing Error is Encountered

This issue has been created since 2022-09-20.

Which @angular/* package(s) are relevant/related to the feature request?

No response

Description

I have noticed that when I make a syntax mistake in the HTML of a component the Angular Compiler throws a vast amount of errors, so much so that the original offending error is buried in a huge stack trace that is cut off in the terminal window of VS Code, my preferred Code Editor for Angular. This can be worked around by exporting the stack trace to common error in the form a text file, however it would be very convenient if I could avoid these extra steps to identify the location of bad HTML.

Ideally, when there is a syntax error in the HTML, I would like an option to be able to have the compiler simply identify the line where the HTML syntax is malformed and skip errors resulting from the malformed HTML syntax which would make the Stack Trace much more useful without needing to resort to workarounds for the issue.

Proposed solution

Introduce an option that suppresses all errors in a stack trace except for the first one when the error is caused by a malformed HTML element (syntax error).

Alternatives considered

A workaround is to export the output to a txt file and read the text file, but this can become cumbersome and adds friction to the normal workflow of a project. Being able to simply and easily see where an HTML syntax error is located in the console without having to resort to the above workaround would be ideal.

Below is an example of the top of the stack trace in VS Code and the syntax error that generated it. Simply identifying the line with the error without showing all the additional errors would make the error output much more readable and useful

Top of HTML syntax stack trace
Example Syntax Error

More Details About Repo
Owner Name angular
Repo Name angular
Full Name angular/angular
Language TypeScript
Created Date 2014-09-18
Updated Date 2022-10-04
Star Count 84139
Watcher Count 3064
Fork Count 22243
Issue Count 1206

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Anamnesis doesn't seem to open right? 2 2022-05-11 2022-10-02
Unit tests fail with pip but work with conda.... 0 2022-01-14 2022-05-05
Some client transfer capabilities broke after upgrade from 1.3.5 -> 1.3.7 10 2021-10-11 2022-07-10
FTP PassivePorts is broke on 1.3.7c? 1 2021-10-15 2022-08-03
Wifi working but not bluetooth on Debian 11 1 2021-10-16 2022-09-18
Silent errors when using the defer() function 1 2021-07-03 2022-09-24
5.17-rc5 cannot compile 4 2022-02-24 2022-08-10
Support a standard consensus like PBFT 1 2020-04-29 2021-12-26
cabal v2-install with missing cabal file gives a very unhelpful error message 1 2020-11-18 2022-07-03
Confusion about what it means to install a package 0 2020-10-24 2022-07-17
Scariest thing is not the monad, it's the ecosystem 0 2020-11-22 2022-07-17
Como funciona? 1 2021-12-15 2021-12-28
Auto full screen the video player 2 2022-03-22 2022-10-01
module load error:module 'deepchem.models' has no attribute 'GraphConvModel' 2 2022-05-04 2022-09-15
Please add a example usage 1 2022-08-30 2022-09-01
[Suggestion] Right click menu 7 2021-04-07 2022-09-19
App request: qpdf 3 2021-11-07 2022-01-14
Rendering of Longer Notes in Group of Eighths 2 2022-06-24 2022-09-24
App crashes on opening 2 2021-11-28 2022-09-18
Application crash in background after song ends - on 5.4.1 4 2021-12-04 2022-09-12
指定时间只执行一次的cron如何写?我指定年份的话就会重复执行,还影响其他任务 2 2021-10-19 2022-08-23
Unable to locate element - A/B test crashes 0 2021-09-24 2022-09-09
pip install ipywidgets 7.7 together with Jupyterlab leads to a failure 1 2022-08-20 2022-09-09
Login_name not useable in Azure SQL DB for Managed Identities 1 2021-08-31 2022-09-15
Syntax error in 30-freescout 1 2021-07-22 2022-09-08
App fails to use existing database. Terminates abnormally. 17 2021-07-21 2022-09-08
Unicode icon 1 2021-06-08 2022-01-11
[Bug]: Index may be not loaded after compaction 2 2022-03-21 2022-09-23
Instead of adding the functions inside of a zip file, could we instead add the files in a sub-directory and then use the `archive_file` terraform resource? 1 2022-09-02 2022-10-03
Cannot read properties of null (reading 'ship') 3 2021-10-17 2022-09-15
Stripe's payment method title is cleared after submitting the Stripe settings form *after* disabling UPE. 0 2021-10-06 2022-10-02
404 on the 1.x API link on cashapp.github.io/sqldelight/ 0 2022-01-18 2022-08-29
5-star ratings column not shown in main playlist view 1 2022-03-06 2022-09-28
Lose global styles when wrapped by StylesProvider 1 2021-05-28 2022-09-30
FM Radio and google camera crash and mobile network not available. 1 2022-07-24 2022-08-02
4.2.4 breaks Collabora on NC 22.2.5 12 2022-02-16 2022-09-29
[Dependencies.swift][SPM] Build Errors in PLCrashReporter Dependency 9 2021-09-22 2022-08-14
Broad issue: "Have students think more" 1 2019-02-13 2022-08-15
DT_SPI_DEV_CS_GPIOS_DT_SPEC_GET is a layering violation that shouldn't exist 0 2022-01-26 2022-01-21
linkless build is broken 1 2021-11-23 2022-07-13
First Android App codelab: 0 2021-07-11 2022-08-22
Properties using DefaultInfo for environment variables should default to secrets 0 2022-01-20 2022-09-17
yaf routing with namespace is on option 2 2022-07-18 2022-09-21
MemorySanitizer, use of uninitialized in slide_hash zlib/deflate.c:219:20 2 2020-08-13 2022-09-20
runtime: "found pointer to free object" on aix-ppc64 1 2022-03-04 2022-09-22
Crash on install attempt 2 2021-05-08 2022-09-28
Preview does not open after "Activating extensions" and then marked as "Unresponsive" "performance issue" 4 2020-08-03 2022-08-10
Powershell: Ctrl-Alt-? does not work in Windows Terminal 6 2019-10-05 2022-09-30
Audacity does not respond to changes in USB configurations 3 2022-02-18 2022-10-03
Does fsync option in fileio benchmark work with many threads? 0 2021-11-03 2022-09-23