Error Messages

- Improved error messages with specific field names rather than types.
This commit is contained in:
Paul Beckingham 2011-05-09 01:05:21 -04:00
parent e22a07156f
commit 93cfbf8dd2
12 changed files with 12 additions and 12 deletions

View file

@ -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 + "'";
}
}

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 ();

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 + "'";
}

View file

@ -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 + "'";
}

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 + "'";
}
////////////////////////////////////////////////////////////////////////////////