Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: runtime/vm/compiler.cc

Issue 2044753002: Make compile-time errors catchable (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 314454544d3137d0ce9ca3db671e16179e63cc9f..93898adc5c69c5b7c51ea6b17078374d2fa7096a 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -165,6 +165,10 @@ DEFINE_RUNTIME_ENTRY(CompileFunction, 1) {
const Error& error =
Error::Handle(Compiler::CompileFunction(thread, function));
if (!error.IsNull()) {
+ if (error.IsLanguageError()) {
+ Exceptions::ThrowCompileTimeError(LanguageError::Cast(error));
+ UNREACHABLE();
+ }
Exceptions::PropagateError(error);
}
}
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698