mirror of
https://github.com/mikedilger/chorus.git
synced 2026-11-19 15:24:25 +00:00
Error type for crate
This commit is contained in:
1 parent
0554654030
commit
0ee79ce787
4 files changed
+76
-2
No files matched your search
@@ -0,0 +1,9 @@
|
||||
use thiserror::Error;
|
||||
|
||||
/// Errors that can occur in the chorus crate
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
// I/O Error
|
||||
#[error("I/O: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
}
|
||||
+8
-2
@@ -1,3 +1,9 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
pub mod error;
|
||||
|
||||
use crate::error::Error;
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
println!("No main yet.");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in new issue
Block a user