refactor(label): Throw exception with small maxlen

This now makes label-maxlen < len(ellipsis) (= 3) a fatal error
disabling the whole module that uses the offending label
This commit is contained in:
patrick96 2018-06-23 14:20:15 +02:00 committed by NBonaparte
parent 0346a965a7
commit 4a494e61e1

View File

@ -225,11 +225,10 @@ namespace drawtypes {
bool ellipsis = conf.get(section, name + "-ellipsis", true);
if(ellipsis && maxlen > 0 && maxlen < 3) {
logger::make().err(sstream() << "Label " << section << "." << name
throw application_error(sstream()
<< "Label " << section << "." << name
<< " has maxlen " << maxlen
<< ", which is smaller than length of ellipsis (3), disabling ellipsis...");
ellipsis = false;
<< ", which is smaller than length of ellipsis (3)");
}
// clang-format off