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

Side by Side Diff: pkg/analyzer/lib/src/util/asserts.dart

Issue 1513643009: Clean up package imports and library names (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « pkg/analyzer/lib/src/string_source.dart ('k') | pkg/analyzer/lib/src/util/lru_map.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 engine.utilities.asserts; 5 library analyzer.src.util.asserts;
6 6
7 /** 7 /**
8 * Ensures that the given [value] is not null. 8 * Ensures that the given [value] is not null.
9 * Otherwise throws an [ArgumentError]. 9 * Otherwise throws an [ArgumentError].
10 * An optional [description] is used in the error message. 10 * An optional [description] is used in the error message.
11 */ 11 */
12 void notNull(Object value, [String description]) { 12 void notNull(Object value, [String description]) {
13 if (value == null) { 13 if (value == null) {
14 if (description == null) { 14 if (description == null) {
15 throw new ArgumentError('Must not be null'); 15 throw new ArgumentError('Must not be null');
16 } else { 16 } else {
17 throw new ArgumentError('Must not be null: $description'); 17 throw new ArgumentError('Must not be null: $description');
18 } 18 }
19 } 19 }
20 } 20 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/string_source.dart ('k') | pkg/analyzer/lib/src/util/lru_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698