aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-01-23 12:30:33 +0100
committerSebastian Geerken <devnull@localhost>2016-01-23 12:30:33 +0100
commit9481d3c3ff40685bf8ef840abbc888cee675ce2e (patch)
treecd4b7f87fb8a9d8c2d15d675534816bd6eba4fed
parent7e838b973ac92c0d41fcd2798eb5f569ca274616 (diff)
SRDOP: Debugging.
-rw-r--r--dw/oofawarewidget.cc3
-rw-r--r--lout/misc.hh14
2 files changed, 16 insertions, 1 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc
index 891d51cf..6912108a 100644
--- a/dw/oofawarewidget.cc
+++ b/dw/oofawarewidget.cc
@@ -493,7 +493,8 @@ Widget *OOFAwareWidget::getWidgetAtPointLevel (int x, int y, int level,
case SL_IN_FLOW:
// Should be implemented in the sub class.
- assertNotReached ();
+ assertNotReached ("getWidgetAtPoint (SL_IN_FLOW) for %s",
+ getClassName ());
break;
case SL_OOF_REF:
diff --git a/lout/misc.hh b/lout/misc.hh
index 24578f02..80f227f8 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -38,6 +38,20 @@ inline void assertNotReached ()
abort ();
}
+inline void assertNotReached (const char *fmt, ...)
+{
+ va_list argp;
+ va_start(argp, fmt);
+
+ fprintf (stderr, "*** [%s] This should not happen: ", prgName);
+ vfprintf(stderr, fmt, argp);
+ fprintf (stderr, "! ***\n");
+
+ va_end(argp);
+
+ abort ();
+}
+
inline void notImplemented (const char *name)
{
fprintf (stderr, "*** [%s] Not implemented: %s ***\n", prgName, name);