Skip to content

Commit

Permalink
Backend: list: add explanation comments for error paths
Browse files Browse the repository at this point in the history
  • Loading branch information
fersaru committed Jan 26, 2024
1 parent dccb693 commit b546438
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,23 @@ async fn list<R: Runtime>(app: tauri::AppHandle<R>, window: tauri::Window<R>) ->
notes.push(Path::new(&dir_entry.file_name()).join("README.md").to_str().unwrap().to_string());
}
}
Err(e) => { return Err(e.to_string()) }
Err(e) => {
// error while figuring out the type of each file in the dir
return Err(e.to_string())
}
}
}
Err(e) => { return Err(e.to_string()) }
Err(e) => {
// error while reading each object in dir
return Err(e.to_string())
}
}
}
}
Err(e) => { return Err(e.to_string()) }
Err(e) => {
// error while reading the dir
return Err(e.to_string())
}
}
return Ok(notes)
}

0 comments on commit b546438

Please sign in to comment.