Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(error): export orogene cmd error enum
- Loading branch information
Showing
3 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use miette::Diagnostic; | ||
use thiserror::Error; | ||
|
||
#[derive(Debug, Error, Diagnostic)] | ||
pub enum OroError { | ||
/// Invalid package name. Only package names should be passed to `oro | ||
/// remove`, but you passed either a package specifier or an invalid | ||
/// package name. | ||
/// | ||
/// Try passing the package name as it appears in your package.json. | ||
#[error("{0} is not a valid package name. Only package names should be passed to `oro remove`, but you passed either a non-NPM package specifier or an invalid package name.")] | ||
#[diagnostic( | ||
code(oro::remove::invalid_package_name), | ||
url(docsrs), | ||
help("Use the package name as it appears in your package.json instead.") | ||
)] | ||
InvalidPackageName(String), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters