Error Messages
- Improved error messages with specific field names rather than types.
This commit is contained in:
@@ -93,7 +93,7 @@ void ColumnDate::measure (Task& task, int& minimum, int& maximum)
|
||||
minimum = maximum = Duration (now - date).formatCompact ().length ();
|
||||
}
|
||||
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
|
||||
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
|
||||
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;
|
||||
|
||||
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 (_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);
|
||||
}
|
||||
else if (_style != "default")
|
||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
||||
throw std::string ("Unrecognized column format 'project.") + _style + "'";
|
||||
|
||||
minimum = longestWord (project);
|
||||
maximum = project.length ();
|
||||
|
||||
@@ -70,7 +70,7 @@ void ColumnRecur::measure (Task& task, int& minimum, int& maximum)
|
||||
minimum = maximum = context.config.get ("recurrence.indicator").length ();
|
||||
}
|
||||
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")
|
||||
minimum = maximum = 1;
|
||||
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);
|
||||
}
|
||||
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
|
||||
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;
|
||||
else if (_style == "short") minimum = maximum = 8;
|
||||
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 ();
|
||||
|
||||
if (_style != "default")
|
||||
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
|
||||
throw std::string ("Unrecognized column format 'urgency.") + _style + "'";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user