mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Error Messages
- Improved error messages with specific field names rather than types.
This commit is contained in:
parent
e22a07156f
commit
93cfbf8dd2
12 changed files with 12 additions and 12 deletions
|
@ -93,7 +93,7 @@ void ColumnDate::measure (Task& task, int& minimum, int& maximum)
|
||||||
minimum = maximum = Duration (now - date).formatCompact ().length ();
|
minimum = maximum = Duration (now - date).formatCompact ().length ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format '") + _attribute + "." + _style + "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ void ColumnDepends::measure (Task& task, int& minimum, int& maximum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'depends.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -125,7 +125,7 @@ void ColumnDescription::measure (Task& task, int& minimum, int& maximum)
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'description.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -60,7 +60,7 @@ void ColumnID::measure (Task& task, int& minimum, int& maximum)
|
||||||
minimum = maximum = length;
|
minimum = maximum = length;
|
||||||
|
|
||||||
if (_style != "default")
|
if (_style != "default")
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'id.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -69,7 +69,7 @@ void ColumnPriority::measure (Task& task, int& minimum, int& maximum)
|
||||||
else if (priority == "L") minimum = maximum = 3;
|
else if (priority == "L") minimum = maximum = 3;
|
||||||
}
|
}
|
||||||
else if (_style != "default")
|
else if (_style != "default")
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'priority.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -58,7 +58,7 @@ void ColumnProject::measure (Task& task, int& minimum, int& maximum)
|
||||||
project = project.substr (0, period);
|
project = project.substr (0, period);
|
||||||
}
|
}
|
||||||
else if (_style != "default")
|
else if (_style != "default")
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'project.") + _style + "'";
|
||||||
|
|
||||||
minimum = longestWord (project);
|
minimum = longestWord (project);
|
||||||
maximum = project.length ();
|
maximum = project.length ();
|
||||||
|
|
|
@ -70,7 +70,7 @@ void ColumnRecur::measure (Task& task, int& minimum, int& maximum)
|
||||||
minimum = maximum = context.config.get ("recurrence.indicator").length ();
|
minimum = maximum = context.config.get ("recurrence.indicator").length ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'recur.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -78,7 +78,7 @@ void ColumnStatus::measure (Task& task, int& minimum, int& maximum)
|
||||||
else if (_style == "short")
|
else if (_style == "short")
|
||||||
minimum = maximum = 1;
|
minimum = maximum = 1;
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'status.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -67,7 +67,7 @@ void ColumnString::measure (const std::string& value, int& minimum, int& maximum
|
||||||
minimum = longestWord (value);
|
minimum = longestWord (value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'string.") + _style + "'";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ void ColumnTags::measure (Task& task, int& minimum, int& maximum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'tags.") + _style + "'";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ void ColumnUUID::measure (Task& task, int& minimum, int& maximum)
|
||||||
if (_style == "default") minimum = maximum = 36;
|
if (_style == "default") minimum = maximum = 36;
|
||||||
else if (_style == "short") minimum = maximum = 8;
|
else if (_style == "short") minimum = maximum = 8;
|
||||||
else
|
else
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'uuid.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -51,7 +51,7 @@ void ColumnUrgency::measure (Task& task, int& minimum, int& maximum)
|
||||||
minimum = maximum = format (task.urgency (), 4, 3).length ();
|
minimum = maximum = format (task.urgency (), 4, 3).length ();
|
||||||
|
|
||||||
if (_style != "default")
|
if (_style != "default")
|
||||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
throw std::string ("Unrecognized column format 'urgency.") + _style + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue