Skip to content

Commit de116ab

Browse files
committed
add context info for tokens.toml load failure
1 parent e35ed43 commit de116ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/tokens.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ impl Default for Tokens {
8181

8282
impl Tokens {
8383
pub fn load() -> Fallible<Tokens> {
84-
let content = ::std::fs::read_to_string(Path::new(TOKENS_PATH))?;
84+
let content = ::std::fs::read_to_string(Path::new(TOKENS_PATH))
85+
.with_context(|_| format!("could not find {}", TOKENS_PATH))?;
8586
let res = ::toml::from_str(&content)?;
8687
Ok(res)
8788
}

0 commit comments

Comments
 (0)