mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +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 (exitCode != 66) exitCode = 65;
|
||||||
if (options.stopOnError) return;
|
if (options.stopOnError) return;
|
||||||
} on FileSystemException catch (error, stackTrace) {
|
} 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);
|
options.trace ? stackTrace : null);
|
||||||
|
|
||||||
// Error 66 indicates no input.
|
// Error 66 indicates no input.
|
||||||
|
@ -82,7 +82,11 @@ class _Watcher {
|
|||||||
exitCode = 65;
|
exitCode = 65;
|
||||||
return false;
|
return false;
|
||||||
} on FileSystemException catch (error, stackTrace) {
|
} 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);
|
stackTrace);
|
||||||
exitCode = 66;
|
exitCode = 66;
|
||||||
return false;
|
return false;
|
||||||
|
@ -22,7 +22,7 @@ class Stderr {
|
|||||||
/// An error thrown by [readFile].
|
/// An error thrown by [readFile].
|
||||||
class FileSystemException {
|
class FileSystemException {
|
||||||
String get message => throw '';
|
String get message => throw '';
|
||||||
String get path => throw '';
|
String? get path => throw '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The standard error for the current process.
|
/// The standard error for the current process.
|
||||||
|
Loading…
Reference in New Issue
Block a user