[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 7bfe072 2/6: Replace an assertion with a more
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 7bfe072 2/6: Replace an assertion with a more elaborate alarum |
Date: |
Sun, 30 Sep 2018 17:07:12 -0400 (EDT) |
branch: master
commit 7bfe0724a345f33249d77c074537df0c02c2bc08
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Replace an assertion with a more elaborate alarum
---
wx_table_generator.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 7c6fca0..2c6797f 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -23,6 +23,7 @@
#include "wx_table_generator.hpp"
+#include "alert.hpp"
#include "assert_lmi.hpp"
#include "miscellany.hpp" // count_newlines(), split_into_lines()
#include "ssize_lmi.hpp"
@@ -247,7 +248,17 @@ void wx_table_generator::output_super_header
for(auto const& i : lines)
{
- LMI_ASSERT(dc().GetTextExtent(i).x <= rect.width);
+ if(rect.width < dc().GetTextExtent(i).x)
+ {
+ alarum()
+ << "Superheader width ("
+ << dc().GetTextExtent(i).x
+ << ") exceeds available space ("
+ << rect.width
+ << "): text is '" << i << "'."
+ << LMI_FLUSH
+ ;
+ }
dc_.DrawLabel(i, rect, wxALIGN_CENTER_HORIZONTAL);
rect.y += row_height_;
pos_y += row_height_;
- [lmi-commits] [lmi] master updated (5e45c3d -> f1af0f9), Greg Chicares, 2018/09/30
- [lmi-commits] [lmi] master f9ddc04 5/6: Do not depict a scalar as a vector, Greg Chicares, 2018/09/30
- [lmi-commits] [lmi] master f1af0f9 6/6: Remove some obsolete comments, Greg Chicares, 2018/09/30
- [lmi-commits] [lmi] master 788def5 3/6: Rename an MST variable, Greg Chicares, 2018/09/30
- [lmi-commits] [lmi] master 7bfe072 2/6: Replace an assertion with a more elaborate alarum,
Greg Chicares <=
- [lmi-commits] [lmi] master d077bc5 1/6: Note a future improvement to a column heading, Greg Chicares, 2018/09/30
- [lmi-commits] [lmi] master ac17f79 4/6: Add and remove defect markers [380], Greg Chicares, 2018/09/30