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

Side by Side Diff: utils/css/css.dart

Issue 10887023: Use new try-catch syntax in runtime/, tools/, and utils/. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/apidoc/mdn/extract.dart ('k') | utils/css/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('css'); 5 #library('css');
6 6
7 #import('dart:math', prefix: 'Math'); 7 #import('dart:math', prefix: 'Math');
8 #import("../lib/file_system.dart"); 8 #import("../lib/file_system.dart");
9 #import('../lib/file_system_memory.dart'); 9 #import('../lib/file_system_memory.dart');
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 cssExpression)); 55 cssExpression));
56 String output = ""; 56 String output = "";
57 String prettyTree = ""; 57 String prettyTree = "";
58 try { 58 try {
59 var tree = parser.parseTemplate(); 59 var tree = parser.parseTemplate();
60 if (tree != null) { 60 if (tree != null) {
61 prettyTree = tree.toDebugString(); 61 prettyTree = tree.toDebugString();
62 Validate.template(tree.selectors, cssworld); 62 Validate.template(tree.selectors, cssworld);
63 output = prettyTree; 63 output = prettyTree;
64 } 64 }
65 } catch (var e) { 65 } catch (e) {
66 String error = e.toString(); 66 String error = e.toString();
67 output = "$error\n$prettyTree"; 67 output = "$error\n$prettyTree";
68 throw e; 68 throw e;
69 } 69 }
70 70
71 return output; 71 return output;
72 } 72 }
OLDNEW
« no previous file with comments | « utils/apidoc/mdn/extract.dart ('k') | utils/css/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698