From 4a494e61e15ec70fde5663af52f8ca5a1a5ce966 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Sat, 23 Jun 2018 14:20:15 +0200 Subject: [PATCH] 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 --- src/drawtypes/label.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/drawtypes/label.cpp b/src/drawtypes/label.cpp index 63616d31..ca7740da 100644 --- a/src/drawtypes/label.cpp +++ b/src/drawtypes/label.cpp @@ -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