diff --git a/lib/native_toolchain_rs.dart b/lib/native_toolchain_rs.dart index 8b30de2..3d1150b 100644 --- a/lib/native_toolchain_rs.dart +++ b/lib/native_toolchain_rs.dart @@ -7,6 +7,8 @@ import 'package:native_toolchain_rs/src/crate_resolver.dart'; import 'package:native_toolchain_rs/src/process_runner.dart'; import 'package:native_toolchain_rs/src/toml_parsing.dart'; +export 'package:native_toolchain_rs/src/exception.dart'; + /// The mode to build the Rust crate with. enum BuildMode { /// Build in release mode; i.e., `cargo build --release` diff --git a/lib/src/build_runner.dart b/lib/src/build_runner.dart index 0a4eefc..d4a513c 100644 --- a/lib/src/build_runner.dart +++ b/lib/src/build_runner.dart @@ -5,7 +5,6 @@ import 'package:hooks/hooks.dart'; import 'package:logging/logging.dart'; import 'package:native_toolchain_rs/native_toolchain_rs.dart'; import 'package:native_toolchain_rs/src/crate_resolver.dart'; -import 'package:native_toolchain_rs/src/exception.dart'; import 'package:native_toolchain_rs/src/process_runner.dart'; import 'package:native_toolchain_rs/src/toml_parsing.dart'; import 'package:path/path.dart' as path; diff --git a/lib/src/exception.dart b/lib/src/exception.dart index 464bab7..4926809 100644 --- a/lib/src/exception.dart +++ b/lib/src/exception.dart @@ -5,11 +5,7 @@ import 'package:meta/meta.dart'; // NOTE: the API for our exceptions is currently experimental // ignore_for_file: public_member_api_docs -/// # WARNING -/// This is experimental! -/// It may change on any new release without notice! -/// Please file an issue with your use-case for it, if you do use it. -@experimental +/// An [Exception] representing a failure while trying to build Rust assets. sealed class RustBuildException implements Exception {} /// # WARNING @@ -67,3 +63,8 @@ final class RustProcessException implements RustBuildException { 'innerProcessException: ${inner ?? 'none'}' ')'; } + +// NOTE: this is here so that end-users can't exhaustively pattern match +// (and thus gives us some API flexibility for new types) +// ignore: unused_element +final class _NoBreakingChangeForNewExceptions implements RustBuildException {}