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

Side by Side Diff: src/site/docs/dart-up-and-running/ch03.markdown

Issue 1301343002: add null-aware operators to the language tour (Closed) Base URL: https://github.com/dart-lang/www.dartlang.org.git@master
Patch Set: incorporate Gilad's review comment Created 5 years, 4 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
OLDNEW
1 --- 1 ---
2 layout: book 2 layout: book
3 title: "A Tour of the Dart Libraries" 3 title: "A Tour of the Dart Libraries"
4 subsite: "Dart Up and Running" 4 subsite: "Dart Up and Running"
5 description: "Read Chapter 3, A Tour of the Dart Libraries (from Dart: Up and Ru nning, published by O'Reilly)." 5 description: "Read Chapter 3, A Tour of the Dart Libraries (from Dart: Up and Ru nning, published by O'Reilly)."
6 prev-chapter: ch02.html 6 prev-chapter: ch02.html
7 prev-chapter-title: "Language Tour" 7 prev-chapter-title: "Language Tour"
8 next-chapter: ch04.html 8 next-chapter: ch04.html
9 next-chapter-title: "Tools" 9 next-chapter-title: "Tools"
10 --- 10 ---
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 960
961 Throwing an application-specific exception is a common way to indicate 961 Throwing an application-specific exception is a common way to indicate
962 that an error has occurred. You can define a custom exception by 962 that an error has occurred. You can define a custom exception by
963 implementing the Exception interface: 963 implementing the Exception interface:
964 964
965 <!-- ch03/exceptions.dart --> 965 <!-- ch03/exceptions.dart -->
966 {% prettify dart %} 966 {% prettify dart %}
967 class FooException implements Exception { 967 class FooException implements Exception {
968 final String msg; 968 final String msg;
969 const FooException([this.msg]); 969 const FooException([this.msg]);
970 String toString() => msg == null ? 'FooException' : msg; 970 String toString() => msg ?? 'FooException';
971 } 971 }
972 {% endprettify %} 972 {% endprettify %}
973 973
974 For more information, see [Exceptions](#exceptions) and the [Exception API 974 For more information, see [Exceptions](#exceptions) and the [Exception API
975 docs.](http://api.dartlang.org/dart_core/Exception.html) 975 docs.](http://api.dartlang.org/dart_core/Exception.html)
976 976
977 977
978 ## dart:async - asynchronous programming {#dartasync---asynchronous-programming} 978 ## dart:async - asynchronous programming {#dartasync---asynchronous-programming}
979 979
980 Asynchronous programming often uses callback functions, but Dart 980 Asynchronous programming often uses callback functions, but Dart
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2796 can get yet more libraries by using the pub tool, discussed in the next 2796 can get yet more libraries by using the pub tool, discussed in the next
2797 chapter. The [args,](https://pub.dartlang.org/packages/args) 2797 chapter. The [args,](https://pub.dartlang.org/packages/args)
2798 [logging,](https://pub.dartlang.org/packages/logging) 2798 [logging,](https://pub.dartlang.org/packages/logging)
2799 [polymer,](https://pub.dartlang.org/packages/polymer) and 2799 [polymer,](https://pub.dartlang.org/packages/polymer) and
2800 [test](https://pub.dartlang.org/packages/test) libraries are just a 2800 [test](https://pub.dartlang.org/packages/test) libraries are just a
2801 sampling of what you can install using pub. 2801 sampling of what you can install using pub.
2802 2802
2803 2803
2804 <hr> 2804 <hr>
2805 {% include book-nav.html %} 2805 {% include book-nav.html %}
OLDNEW
« no previous file with comments | « src/site/docs/dart-up-and-running/ch02.markdown ('k') | src/site/docs/dart-up-and-running/preface.markdown » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698