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

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

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « analyzer/lib/src/task/model.dart ('k') | 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library engine.utilities.asserts;
6
7 /**
8 * Ensures that the given [value] is not null.
9 * Otherwise throws an [ArgumentError].
10 * An optional [description] is used in the error message.
11 */
12 void notNull(Object value, [String description]) {
13 if (value == null) {
14 if (description == null) {
15 throw new ArgumentError('Must not be null');
16 } else {
17 throw new ArgumentError('Must not be null: $description');
18 }
19 }
20 }
OLDNEW
« no previous file with comments | « analyzer/lib/src/task/model.dart ('k') | analyzer/lib/src/util/lru_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698