Error type for crate

This commit is contained in:
Mike Dilger committed 2024-02-15 09:13:35 +13:00
1 parent 0554654030
commit 0ee79ce787
4 files changed
+76 -2

No files matched your search

+9
View File
@@ -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
View File
@@ -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(())
}