mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Make error better
This commit is contained in:
parent
00989a0eb5
commit
83384e7f1c
2 changed files with 5 additions and 6 deletions
|
@ -72,7 +72,8 @@ impl Config {
|
|||
let print_empty_columns = bool_collection.get("print_empty_columns").cloned().unwrap_or(false);
|
||||
|
||||
let color = Self::get_color_collection(data);
|
||||
let filter = Self::get_filter(data, report);
|
||||
let filter = Self::get_filter(data, report)?;
|
||||
let filter = format!("{} ", filter);
|
||||
let data_location = Self::get_data_location(data);
|
||||
let due = Self::get_due(data);
|
||||
let rule_precedence_color = Self::get_rule_precedence_color(data);
|
||||
|
@ -339,11 +340,9 @@ impl Config {
|
|||
data.split(',').map(|s| s.to_string()).collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
fn get_filter(data: &str, report: &str) -> String {
|
||||
let filter = Self::get_config(format!("report.{}.filter", report).as_str(), data)
|
||||
fn get_filter(data: &str, report: &str) -> Result<String> {
|
||||
Self::get_config(format!("report.{}.filter", report).as_str(), data)
|
||||
.context(format!("Unable to parse `task show report.{}.filter`.", report))
|
||||
.unwrap();
|
||||
format!("{} ", filter)
|
||||
}
|
||||
|
||||
fn get_data_location(data: &str) -> String {
|
||||
|
|
|
@ -83,7 +83,7 @@ fn main() {
|
|||
let config = matches.value_of("config").unwrap_or("~/.taskrc");
|
||||
let report = matches.value_of("report").unwrap_or("next");
|
||||
task::block_on(tui_main(config, report)).expect(
|
||||
"[taskwarrior-tui error]. Please report as a github issue on https://github.com/kdheepak/taskwarrior-tui",
|
||||
"[taskwarrior-tui error]. If you need additional help, please report as a github issue on https://github.com/kdheepak/taskwarrior-tui",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue