mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
cleanup unwrap
This commit is contained in:
parent
d3f2b95f7a
commit
e003725f21
13 changed files with 110 additions and 55 deletions
18
compiler/module/src/module_err.rs
Normal file
18
compiler/module/src/module_err.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
use snafu::{Backtrace, Snafu};
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
#[snafu(visibility(pub))]
|
||||
pub enum ModuleError {
|
||||
#[snafu(display(
|
||||
"ModuleIdNotFound: I could not find the ModuleId {} in Interns.all_ident_ids: {}.",
|
||||
module_id,
|
||||
all_ident_ids
|
||||
))]
|
||||
ModuleIdNotFound {
|
||||
module_id: String,
|
||||
all_ident_ids: String,
|
||||
backtrace: Backtrace,
|
||||
},
|
||||
}
|
||||
|
||||
pub type ModuleResult<T, E = ModuleError> = std::result::Result<T, E>;
|
Loading…
Add table
Add a link
Reference in a new issue