in lib/src/command.dart [242:270]
int _chooseExitCode(Object exception) {
if (exception is SolveFailure) {
var packageNotFound = exception.packageNotFound;
if (packageNotFound != null) exception = packageNotFound;
}
while (exception is WrappedException && exception.innerError is Exception) {
exception = exception.innerError!;
}
if (exception is HttpException ||
exception is http.ClientException ||
exception is SocketException ||
exception is TlsException ||
exception is PubHttpException ||
exception is git.GitException ||
exception is PackageNotFoundException) {
return exit_codes.UNAVAILABLE;
} else if (exception is FileSystemException || exception is FileException) {
return exit_codes.NO_INPUT;
} else if (exception is FormatException || exception is DataException) {
return exit_codes.DATA;
} else if (exception is ConfigException) {
return exit_codes.CONFIG;
} else if (exception is UsageException) {
return exit_codes.USAGE;
} else {
return 1;
}
}