소스 검색

chore: remove line numbers from default errors

Evan You 6 년 전
부모
커밋
b15951e190
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      packages/compiler-core/src/errors.ts

+ 1 - 2
packages/compiler-core/src/errors.ts

@@ -19,8 +19,7 @@ export function createCompilerError<T extends number>(
   messages?: { [code: number]: string }
 ): T extends ErrorCodes ? CoreCompilerError : CompilerError {
   const msg = __DEV__ || !__BROWSER__ ? (messages || errorMessages)[code] : code
-  const locInfo = loc ? ` (${loc.start.line}:${loc.start.column})` : ``
-  const error = new SyntaxError(msg + locInfo) as CompilerError
+  const error = new SyntaxError(String(msg)) as CompilerError
   error.code = code
   error.loc = loc
   return error as any