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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10891022: Update corelib/ and lib/ to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « lib/compiler/implementation/compile_time_constants.dart ('k') | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 9b7dc28194c3193ab3ca9bdb991b09d6b47a696c..ec4a5cb689c822771329656a1cda72d3550233f3 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -110,16 +110,16 @@ class Compiler implements DiagnosticListener {
_currentElement = element;
try {
return f();
- } catch (CompilerCancelledException ex) {
+ } on CompilerCancelledException catch (ex) {
throw;
- } catch (StackOverflowException ex) {
+ } on StackOverflowException catch (ex) {
// We cannot report anything useful in this case, because we
// do not have enough stack space.
throw;
- } catch (var ex) {
+ } catch (ex) {
try {
unhandledExceptionOnElement(element);
- } catch (var doubleFault) {
+ } catch (doubleFault) {
// Ignoring exceptions in exception handling.
}
throw;
@@ -264,7 +264,7 @@ class Compiler implements DiagnosticListener {
bool run(Uri uri) {
try {
runCompiler(uri);
- } catch (CompilerCancelledException exception) {
+ } on CompilerCancelledException catch (exception) {
log(exception.toString());
log('compilation failed');
return false;
« no previous file with comments | « lib/compiler/implementation/compile_time_constants.dart ('k') | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698