commit | 7fae9a61baf7206b7cf933af6651e907e225c433 | [log] [tgz] |
---|---|---|
author | [email protected] <[email protected]> | Thu Jul 17 22:14:21 2014 +0000 |
committer | Natalie Weizenbaum <[email protected]> | Thu May 14 16:56:24 2015 -0700 |
tree | 639fc6b48fcdfdfdf98c5ab63fc19290174596bf | |
parent | 57b24a55d53eb0ed037f5488369171a698eb5c93 [diff] [blame] |
Include file path in JSON error when possible. I also cleaned up a bunch of unused imports. BUG=https://code.google.com/p/dart/issues/detail?id=20067 [email protected] Review URL: https://codereview.chromium.org//391363004 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@38352 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/pubspec.dart b/lib/src/pubspec.dart index 3291b34..dafb513 100644 --- a/lib/src/pubspec.dart +++ b/lib/src/pubspec.dart
@@ -223,7 +223,9 @@ var pubspecPath = path.join(packageDir, 'pubspec.yaml'); var pubspecUri = path.toUri(pubspecPath); if (!fileExists(pubspecPath)) { - fail('Could not find a file named "pubspec.yaml" in "$packageDir".'); + throw new FileException( + 'Could not find a file named "pubspec.yaml" in "$packageDir".', + pubspecPath); } return new Pubspec.parse(readTextFile(pubspecPath), sources,