Chromium Code Reviews| Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| index 9b304e488f675c3b6fcc619d83f7e83b90c576de..bb8873997cee949963a0ead7069e572be80b81d2 100644 |
| --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
| @@ -2186,7 +2186,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
| Expression buildCompileTimeError(error, [int charOffset = -1]) { |
| String message = new InputError(uri, charOffset, error).format(); |
| print(message); |
| - return new Throw(new StringLiteral(message)); |
| + final Constructor constructor = coreTypes.getCoreClass( |
|
ahe
2017/02/09 16:03:21
Could you add:
// TODO(ahe): Use a method on Targ
|
| + "dart:core", "_CompileTimeError").constructors.first; |
| + return new Throw(new ConstructorInvocation( |
| + constructor, |
| + new Arguments(<Expression>[new StringLiteral(message)]))); |
| } |
| Statement buildCompileTimeErrorStatement(error, [int charOffset = -1]) { |