| Index: dart/lib/compiler/implementation/compiler.dart
|
| diff --git a/dart/lib/compiler/implementation/compiler.dart b/dart/lib/compiler/implementation/compiler.dart
|
| index 092ba2ecc561c959c277435ae5aa175ed247e708..7201c1e1c0304d28de117dc3e3d95b50928057e4 100644
|
| --- a/dart/lib/compiler/implementation/compiler.dart
|
| +++ b/dart/lib/compiler/implementation/compiler.dart
|
| @@ -17,8 +17,15 @@ class WorkItem {
|
| String run(Compiler compiler) {
|
| String code = compiler.universe.generatedCode[element];
|
| if (code !== null) return code;
|
| - if (!isAnalyzed()) compiler.analyze(this);
|
| - return compiler.codegen(this);
|
| + try {
|
| + if (!isAnalyzed()) compiler.analyze(this);
|
| + return compiler.codegen(this);
|
| + } catch (CompilerCancelledException ex) {
|
| + throw;
|
| + } catch (var ex) {
|
| + compiler.unhandledExceptionOnElement(element);
|
| + throw;
|
| + }
|
| }
|
| }
|
|
|
| @@ -138,6 +145,12 @@ class Compiler implements DiagnosticListener {
|
| });
|
| }
|
|
|
| + void unhandledExceptionOnElement(Element element) {
|
| + internalErrorOnElement(element, '''
|
| +An unhandled exception was thrown.
|
| +Please report this problem at http://dartbug.com/new.''');
|
| + }
|
| +
|
| void cancel([String reason, Node node, Token token,
|
| HInstruction instruction, Element element]) {
|
| SourceSpan span = const SourceSpan(null, null, null);
|
|
|