Skip to content

Better error reporting of parsing errors #15023

Closed
@mcalmus

Description

@mcalmus

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

unknown, but I doubt it

Description

A clear and concise description of the problem...

This is related to issue #10757
In my case the cli gives the error "An unhandled exception occurred: Workspace needs to be loaded before it is used." because there was something invalid in angular.json. Like issue #11204, the cli should indicate the parsing error as the cause of the issue and tell the user where and in which file the problem occurred.

🔬 Minimal Reproduction

🔥 Exception or Error




An unhandled exception occurred: Workspace needs to be loaded before it is used.

🌍 Your Environment




Angular CLI: 8.1.0
Node: 10.15.3
OS: win32 x64
Angular: 8.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions