Skip to content

error is a simple Mush module that prints error messages to stderr, optionally exiting with a status code — Mush-style!

License

Notifications You must be signed in to change notification settings

francescobianco/error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚨 error

error is a simple Mush module that prints error messages to stderr, optionally exiting with a status code — Mush-style!

💾 Installation

To use error, add it as a dependency in your Manifest.toml:

[dependencies]
error = "*"

⚙️ Usage

Using error is extremely easy. Just follow these steps:

  1. Import the module into your Mush project.
  2. Call the error function to print messages to stderr, with optional exit.

Shell Examples

# print error to stderr, no exit
$ error "file not found"
error: file not found

# print error to stderr and exit with status code
$ error "syntax error" 1
error: syntax error

In a Mush script

extern package error

main() {
    error "something went wrong" 2
}

🪪 License

This project is licensed under the MIT License – see the LICENSE file for details.

About

error is a simple Mush module that prints error messages to stderr, optionally exiting with a status code — Mush-style!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published