mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
started using scope properly, improved error backtrace conversion
This commit is contained in:
parent
2158686a0a
commit
a272765fc7
19 changed files with 184 additions and 110 deletions
|
@ -1,5 +1,7 @@
|
|||
use snafu::{Backtrace, Snafu};
|
||||
|
||||
use crate::symbol::IdentId;
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
#[snafu(visibility(pub))]
|
||||
pub enum ModuleError {
|
||||
|
@ -13,6 +15,16 @@ pub enum ModuleError {
|
|||
all_ident_ids: String,
|
||||
backtrace: Backtrace,
|
||||
},
|
||||
#[snafu(display(
|
||||
"IdentIdNotFound: I could not find IdentId {:?} in ident_ids {:?}.",
|
||||
ident_id,
|
||||
ident_ids_str
|
||||
))]
|
||||
IdentIdNotFound {
|
||||
ident_id: IdentId,
|
||||
ident_ids_str: 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