Download flutter/packages/flutter_tools/lib/src/base/common.dart from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 894 Bytes
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/lib/src/base/common.dart
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/lib/src/base/common.dart
-
curl -L -o common.dart https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/lib/src/base/common.dart
894 Bytes
| // Copyright 2014 The Flutter Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| /// Throw a specialized exception for expected situations | |
| /// where the tool should exit with a clear message to the user | |
| /// and no stack trace unless the --verbose option is specified. | |
| /// For example: network errors. | |
| Never throwToolExit(String? message, { int? exitCode }) { | |
| throw ToolExit(message, exitCode: exitCode); | |
| } | |
| /// Specialized exception for expected situations | |
| /// where the tool should exit with a clear message to the user | |
| /// and no stack trace unless the --verbose option is specified. | |
| /// For example: network errors. | |
| class ToolExit implements Exception { | |
| ToolExit(this.message, { this.exitCode }); | |
| final String? message; | |
| final int? exitCode; | |
| String toString() => 'Error: $message'; | |
| } | |