diff --git a/doc/api/dcat/CatResult-class.html b/doc/api/dcat/CatResult-class.html index 3afea57..95cafd2 100644 --- a/doc/api/dcat/CatResult-class.html +++ b/doc/api/dcat/CatResult-class.html @@ -146,7 +146,7 @@
void addMessage(int exitCode, String message, {String? path}) {
- this.exitCode = exitCode;
+ void addMessage(String message, {String? path}) {
+ exitCode = exitFailure;
if (path != null && path.isNotEmpty) {
messages.add('$path: $message');
} else {
diff --git a/doc/api/dcat/cat.html b/doc/api/dcat/cat.html
index bb1ec15..f912708 100644
--- a/doc/api/dcat/cat.html
+++ b/doc/api/dcat/cat.html
@@ -93,10 +93,10 @@
if (paths.isEmpty) {
if (input != null) {
try {
- await _writeStream(input, lastLine, output, numberNonBlank, showEnds,
+ await _copyStream(input, lastLine, output, numberNonBlank, showEnds,
showLineNumbers, showNonPrinting, showTabs, squeezeBlank);
} catch (e) {
- result.addMessage(exitFailure, _formatError(e));
+ result.addMessage(_getErrorMessage(e));
}
}
} else {
@@ -108,10 +108,10 @@
} else {
stream = File(path).openRead();
}
- await _writeStream(stream, lastLine, output, numberNonBlank, showEnds,
+ await _copyStream(stream, lastLine, output, numberNonBlank, showEnds,
showLineNumbers, showNonPrinting, showTabs, squeezeBlank);
} catch (e) {
- result.addMessage(exitFailure, _formatError(e), path: path);
+ result.addMessage(_getErrorMessage(e), path: path);
}
}
}