FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bm/src/utils/error.rs at main · fezcode/bm · GitHub
fezcode
/
bm
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
13
Code
Issues
4
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
bm
/
src
/
utils
/
error.rs
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (22 loc) · 680 Bytes
Breadcrumbs
bm
/
src
/
utils
/
error.rs
Copy path
File metadata and controls
23 lines (22 loc) · 680 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pub
enum
ErrorCode
{
UnrecognizedArgument
=
1
,
NoArgumentProvided
=
2
,
HomeDirAccess
=
3
,
StoreFileParseError
=
4
,
StoreFileSerializationError
=
5
,
UnableToWriteToFile
=
6
,
CommandVerificationError
=
7
,
ImpossibleCommand
=
8
,
AddCommandPathNotFound
=
9
,
AddCommandOptionMatchFailed
=
10
,
AddCommandNotOverwritable
=
11
,
AddCommandPathTypeError
=
12
,
ShowCommandNameNotFound
=
13
,
DeleteCommandNameNotGiven
=
14
,
DeleteCommandNameNotFound
=
15
,
HelpPrinted
=
255
}
pub
fn
print_error_and_exit
(
error_msg
:
String
,
error_code
:
ErrorCode
)
{
eprintln
!
(
"{}"
,
error_msg
)
;
std
::
process
::
exit
(
error_code
as
i32
)
;
}
Back
|
FazBrowse Home
|
New Git URL