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

Unified Diff: packages/package_config/lib/src/util.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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 | « packages/package_config/lib/src/packages_io_impl.dart ('k') | packages/package_config/package_config.iml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/package_config/lib/src/util.dart
diff --git a/packages/package_config/lib/src/util.dart b/packages/package_config/lib/src/util.dart
index badf64086da8308f16d6aba0d169a42a2da7e7c4..f1e1afd0a5d0d8469ef1dc5870a1eac221c9477d 100644
--- a/packages/package_config/lib/src/util.dart
+++ b/packages/package_config/lib/src/util.dart
@@ -43,29 +43,29 @@ int _findInvalidCharacter(String string) {
/// Validate that a Uri is a valid package:URI.
String checkValidPackageUri(Uri packageUri) {
if (packageUri.scheme != "package") {
- throw new ArgumentError.value(packageUri, "packageUri",
- "Not a package: URI");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Not a package: URI");
}
if (packageUri.hasAuthority) {
- throw new ArgumentError.value(packageUri, "packageUri",
- "Package URIs must not have a host part");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Package URIs must not have a host part");
}
if (packageUri.hasQuery) {
// A query makes no sense if resolved to a file: URI.
- throw new ArgumentError.value(packageUri, "packageUri",
- "Package URIs must not have a query part");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Package URIs must not have a query part");
}
if (packageUri.hasFragment) {
// We could leave the fragment after the URL when resolving,
// but it would be odd if "package:foo/foo.dart#1" and
// "package:foo/foo.dart#2" were considered different libraries.
// Keep the syntax open in case we ever get multiple libraries in one file.
- throw new ArgumentError.value(packageUri, "packageUri",
- "Package URIs must not have a fragment part");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Package URIs must not have a fragment part");
}
if (packageUri.path.startsWith('/')) {
- throw new ArgumentError.value(packageUri, "packageUri",
- "Package URIs must not start with a '/'");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Package URIs must not start with a '/'");
}
int firstSlash = packageUri.path.indexOf('/');
if (firstSlash == -1) {
@@ -76,8 +76,8 @@ String checkValidPackageUri(Uri packageUri) {
int badIndex = _findInvalidCharacter(packageName);
if (badIndex >= 0) {
if (packageName.isEmpty) {
- throw new ArgumentError.value(packageUri, "packageUri",
- "Package names mus be non-empty");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Package names mus be non-empty");
}
if (badIndex == packageName.length) {
throw new ArgumentError.value(packageUri, "packageUri",
@@ -90,8 +90,8 @@ String checkValidPackageUri(Uri packageUri) {
// Printable character.
badChar = "'${packageName[badIndex]}' ($badChar)";
}
- throw new ArgumentError.value(packageUri, "packageUri",
- "Package names must not contain $badChar");
+ throw new ArgumentError.value(
+ packageUri, "packageUri", "Package names must not contain $badChar");
}
return packageName;
}
« no previous file with comments | « packages/package_config/lib/src/packages_io_impl.dart ('k') | packages/package_config/package_config.iml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698