mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Error: track message and prefix/location separately. (#1529)
This allows us to combine multiple Errors together without repeating the prefix information. Also fixes several cases where two "COMPILATION ERROR" prefixes would be prepended to the same message when errors with prefixes and locations were produced by the lexer and parser.
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ static auto Main(llvm::StringRef default_prelude_file, int argc, char* argv[])
|
||||
auto ExplorerMain(llvm::StringRef default_prelude_file, int argc, char** argv)
|
||||
-> int {
|
||||
if (auto result = Main(default_prelude_file, argc, argv); !result.ok()) {
|
||||
llvm::errs() << result.error().message() << "\n";
|
||||
llvm::errs() << result.error() << "\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user