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:
parent
0346a965a7
commit
4a494e61e1
@ -225,11 +225,10 @@ namespace drawtypes {
|
|||||||
bool ellipsis = conf.get(section, name + "-ellipsis", true);
|
bool ellipsis = conf.get(section, name + "-ellipsis", true);
|
||||||
|
|
||||||
if(ellipsis && maxlen > 0 && maxlen < 3) {
|
if(ellipsis && maxlen > 0 && maxlen < 3) {
|
||||||
logger::make().err(sstream() << "Label " << section << "." << name
|
throw application_error(sstream()
|
||||||
|
<< "Label " << section << "." << name
|
||||||
<< " has maxlen " << maxlen
|
<< " has maxlen " << maxlen
|
||||||
<< ", which is smaller than length of ellipsis (3), disabling ellipsis...");
|
<< ", which is smaller than length of ellipsis (3)");
|
||||||
|
|
||||||
ellipsis = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
Loading…
Reference in New Issue
Block a user