error: introduce thiserror to add path to error message

For some cgroup file operations, when failed, add the path
and the value (for write operation) to the error message.

Fixes: #93

Signed-off-by: bin liu <liubin0329@gmail.com>
This commit is contained in:
bin liu
2022-11-18 17:20:21 +08:00
parent 4d8f704a4b
commit d387c6edc7
18 changed files with 437 additions and 208 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ fn test_cpuset_set_cpus_add_task() {
println!("tasks after added: {:?}", tasks);
// remove task
let _ = cg.remove_task(CgroupPid::from(pid_i));
cg.remove_task(CgroupPid::from(pid_i));
let tasks = cg.tasks();
println!("tasks after deleted: {:?}", tasks);
assert_eq!(0, tasks.len());