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

Side by Side Diff: pkg/compiler/lib/src/warnings.dart

Issue 1131593006: Report malformed URIs in library dependencies (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 howToFix: "Is '#{name}' spelled right?", 1553 howToFix: "Is '#{name}' spelled right?",
1554 examples: const [ 1554 examples: const [
1555 """ 1555 """
1556 // 'addAll' is misspelled. 1556 // 'addAll' is misspelled.
1557 @MirrorsUsed(targets: 'dart.core.List.addAl') 1557 @MirrorsUsed(targets: 'dart.core.List.addAl')
1558 import 'dart:mirrors'; 1558 import 'dart:mirrors';
1559 1559
1560 main() {} 1560 main() {}
1561 """]); 1561 """]);
1562 1562
1563 static const MessageKind INVALID_URI = const MessageKind(
1564 "'#{uri}' is not a valid URI.",
1565 howToFix: DONT_KNOW_HOW_TO_FIX,
1566 examples: const [
1567 """
1568 // can't have a '[' in a URI
1569 import '../../Udyn[mic ils/expect.dart';
1570
1571 main() {}
1572 """]);
1573
1563 static const MessageKind READ_SCRIPT_ERROR = const MessageKind( 1574 static const MessageKind READ_SCRIPT_ERROR = const MessageKind(
1564 "Can't read '#{uri}' (#{exception}).", 1575 "Can't read '#{uri}' (#{exception}).",
1565 // Don't know how to fix since the underlying error is unknown. 1576 // Don't know how to fix since the underlying error is unknown.
1566 howToFix: DONT_KNOW_HOW_TO_FIX, 1577 howToFix: DONT_KNOW_HOW_TO_FIX,
1567 examples: const [ 1578 examples: const [
1568 """ 1579 """
1569 // 'foo.dart' does not exist. 1580 // 'foo.dart' does not exist.
1570 import 'foo.dart'; 1581 import 'foo.dart';
1571 1582
1572 main() {} 1583 main() {}
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 static String convertToString(value) { 2556 static String convertToString(value) {
2546 if (value is ErrorToken) { 2557 if (value is ErrorToken) {
2547 // Shouldn't happen. 2558 // Shouldn't happen.
2548 return value.assertionMessage; 2559 return value.assertionMessage;
2549 } else if (value is Token) { 2560 } else if (value is Token) {
2550 value = value.value; 2561 value = value.value;
2551 } 2562 }
2552 return '$value'; 2563 return '$value';
2553 } 2564 }
2554 } 2565 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | tests/compiler/dart2js/malformed_uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698