Call out addError API in stderr docs
Closes #32808
One could reasonably think that `addError` is a useful API on `stderr`,
but in this case it will only cause an unhandled async error and exit
the VM.
Change-Id: Ia9e14ab53faec19aed91a1a5acc0709807204de8
Reviewed-on: https://dart-review.googlesource.com/71921
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index 626ce7e..bba0d70 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -198,6 +198,10 @@
*
* This class can also be used to check whether `stdout` or `stderr` is
* connected to a terminal and query some terminal properties.
+ *
+ * The [addError] API is inherited from [StreamSink] and calling it will result
+ * in an unhandled asynchronous error unless there is an error handler on
+ * [done].
*/
class Stdout extends _StdSink implements IOSink {
final int _fd;
@@ -403,6 +407,10 @@
}
/// The standard output stream of data written by this program.
+///
+/// The `addError` API is inherited from `StreamSink` and calling it will
+/// result in an unhandled asynchronous error unless there is an error handler
+/// on `done`.
Stdout get stdout {
if (_stdout == null) {
_stdout = _StdIOUtils._getStdioOutputStream(_stdoutFD);
@@ -411,6 +419,10 @@
}
/// The standard output stream of errors written by this program.
+///
+/// The `addError` API is inherited from `StreamSink` and calling it will
+/// result in an unhandled asynchronous error unless there is an error handler
+/// on `done`.
Stdout get stderr {
if (_stderr == null) {
_stderr = _StdIOUtils._getStdioOutputStream(_stderrFD);