mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
Make the IO interface align with the VM API
This commit is contained in:
parent
654744f5f4
commit
102d3cedc2
@ -88,7 +88,11 @@ Future<void> main(List<String> args) async {
|
||||
if (exitCode != 66) exitCode = 65;
|
||||
if (options.stopOnError) return;
|
||||
} on FileSystemException catch (error, stackTrace) {
|
||||
printError("Error reading ${p.relative(error.path)}: ${error.message}.",
|
||||
var path = error.path;
|
||||
printError(
|
||||
path == null
|
||||
? error.message
|
||||
: "Error reading ${p.relative(path)}: ${error.message}.",
|
||||
options.trace ? stackTrace : null);
|
||||
|
||||
// Error 66 indicates no input.
|
||||
|
@ -82,7 +82,11 @@ class _Watcher {
|
||||
exitCode = 65;
|
||||
return false;
|
||||
} on FileSystemException catch (error, stackTrace) {
|
||||
_printError("Error reading ${p.relative(error.path)}: ${error.message}.",
|
||||
var path = error.path;
|
||||
_printError(
|
||||
path == null
|
||||
? error.message
|
||||
: "Error reading ${p.relative(path)}: ${error.message}.",
|
||||
stackTrace);
|
||||
exitCode = 66;
|
||||
return false;
|
||||
|
@ -22,7 +22,7 @@ class Stderr {
|
||||
/// An error thrown by [readFile].
|
||||
class FileSystemException {
|
||||
String get message => throw '';
|
||||
String get path => throw '';
|
||||
String? get path => throw '';
|
||||
}
|
||||
|
||||
/// The standard error for the current process.
|
||||
|
Loading…
Reference in New Issue
Block a user