| OLD | NEW |
| 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 /// Generic utility functions. Stuff that should possibly be in core. | 5 /// Generic utility functions. Stuff that should possibly be in core. |
| 6 library pub.utils; | |
| 7 | |
| 8 import 'dart:async'; | 6 import 'dart:async'; |
| 9 import "dart:convert"; | 7 import "dart:convert"; |
| 10 import 'dart:io'; | 8 import 'dart:io'; |
| 11 | 9 |
| 12 import "package:crypto/crypto.dart"; | 10 import "package:crypto/crypto.dart"; |
| 13 import 'package:path/path.dart' as path; | 11 import 'package:path/path.dart' as path; |
| 14 import "package:stack_trace/stack_trace.dart"; | 12 import "package:stack_trace/stack_trace.dart"; |
| 15 | 13 |
| 16 import 'exceptions.dart'; | 14 import 'exceptions.dart'; |
| 17 import 'io.dart'; | 15 import 'io.dart'; |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 } else { | 940 } else { |
| 943 throw new ApplicationException(message); | 941 throw new ApplicationException(message); |
| 944 } | 942 } |
| 945 } | 943 } |
| 946 | 944 |
| 947 /// Throw a [DataException] with [message] to indicate that the command has | 945 /// Throw a [DataException] with [message] to indicate that the command has |
| 948 /// failed because of invalid input data. | 946 /// failed because of invalid input data. |
| 949 /// | 947 /// |
| 950 /// This will report the error and cause pub to exit with [exit_codes.DATA]. | 948 /// This will report the error and cause pub to exit with [exit_codes.DATA]. |
| 951 void dataError(String message) => throw new DataException(message); | 949 void dataError(String message) => throw new DataException(message); |
| OLD | NEW |