refactor(compiler): improve error messages in aot compiler (#14017)
Previously aot compiler prints stack traces when it fails to resolve. New behavior: aot compiler outputs the error message. Example: https://gist.github.com/bowenni/a7fe81d916e8cd4a06b0e133436f40fb PR Close #14017
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
import {Attribute, Component, ContentChild, ContentChildren, Directive, Host, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, Pipe, Self, SkipSelf, ViewChild, ViewChildren, animate, group, keyframes, sequence, state, style, transition, trigger} from '@angular/core';
|
||||
|
||||
import {ReflectorReader} from '../private_import_core';
|
||||
import {SyntaxError} from '../util';
|
||||
|
||||
import {StaticSymbol} from './static_symbol';
|
||||
import {StaticSymbolResolver} from './static_symbol_resolver';
|
||||
@ -554,7 +555,7 @@ export class StaticReflector implements ReflectorReader {
|
||||
if (e.fileName) {
|
||||
throw positionalError(message, e.fileName, e.line, e.column);
|
||||
}
|
||||
throw new Error(message);
|
||||
throw new SyntaxError(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user