summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-01-09 16:25:17 +0100
committerSebastian Geerken <devnull@localhost>2016-01-09 16:25:17 +0100
commit9e5ef05a592d637f115b8a8b0b61da940d7bbbe4 (patch)
tree16fff5f08f8827ec869132c53a231d456a50018e
parentc9199eabe605b94cbfc47ac356a651cc086a6747 (diff)
Better abort messages.
-rw-r--r--dw/oofawarewidget.cc16
-rw-r--r--dw/ooffloatsmgr.cc8
-rw-r--r--dw/oofposrelmgr.cc4
-rw-r--r--dw/ui.cc8
-rw-r--r--dw/widget.cc10
-rw-r--r--lout/misc.hh6
6 files changed, 29 insertions, 23 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc
index 3d480535..12d9c958 100644
--- a/dw/oofawarewidget.cc
+++ b/dw/oofawarewidget.cc
@@ -541,17 +541,17 @@ void OOFAwareWidget::removeChild (Widget *child)
void OOFAwareWidget::borderChanged (int oofmIndex, int y, Widget *widgetOOF)
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::borderChanged");
}
void OOFAwareWidget::widgetRefSizeChanged (int externalIndex)
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::widgetRefSizeChanged");
}
void OOFAwareWidget::clearPositionChanged ()
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::clearPositionChanged");
}
void OOFAwareWidget::oofSizeChanged (bool extremesChanged)
@@ -569,31 +569,31 @@ void OOFAwareWidget::oofSizeChanged (bool extremesChanged)
int OOFAwareWidget::getGeneratorX (int oofmIndex)
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::getGeneratorX");
return 0;
}
int OOFAwareWidget::getGeneratorY (int oofmIndex)
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::getGeneratorY");
return 0;
}
int OOFAwareWidget::getGeneratorWidth ()
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::getGeneratorWidth");
return 0;
}
int OOFAwareWidget::getMaxGeneratorWidth ()
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::getMaxGeneratorWidth");
return 0;
}
bool OOFAwareWidget::usesMaxGeneratorWidth ()
{
- assertNotReached ();
+ notImplemented ("OOFAwareWidget::usesMaxGeneratorWidth");
return false;
}
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc
index a4750e5a..06bab82b 100644
--- a/dw/ooffloatsmgr.cc
+++ b/dw/ooffloatsmgr.cc
@@ -770,13 +770,13 @@ void OOFFloatsMgr::tellPosition2 (Widget *widget, int x, int y)
void OOFFloatsMgr::tellIncompletePosition1 (Widget *generator, Widget *widget,
int x, int y)
{
- assertNotReached ();
+ notImplemented ("OOFFloatsMgr::tellIncompletePosition1");
}
void OOFFloatsMgr::tellIncompletePosition2 (Widget *generator, Widget *widget,
int x, int y)
{
- assertNotReached ();
+ notImplemented ("OOFFloatsMgr::tellIncompletePosition2");
}
bool OOFFloatsMgr::collidesV (Float *vloat, Float *other, int *yReal)
@@ -1280,13 +1280,13 @@ bool OOFFloatsMgr::dealingWithSizeOfChild (core::Widget *child)
int OOFFloatsMgr::getAvailWidthOfChild (Widget *child, bool forceValue)
{
- assertNotReached ();
+ notImplemented ("OOFFloatsMgr::getAvailWidthOfChild");
return 0;
}
int OOFFloatsMgr::getAvailHeightOfChild (Widget *child, bool forceValue)
{
- assertNotReached ();
+ notImplemented ("OOFFloatsMgr::getAvailHeightOfChild");
return 0;
}
diff --git a/dw/oofposrelmgr.cc b/dw/oofposrelmgr.cc
index 2b3a85ac..17d59b37 100644
--- a/dw/oofposrelmgr.cc
+++ b/dw/oofposrelmgr.cc
@@ -234,13 +234,13 @@ bool OOFPosRelMgr::dealingWithSizeOfChild (Widget *child)
int OOFPosRelMgr::getAvailWidthOfChild (Widget *child, bool forceValue)
{
- assertNotReached ();
+ notImplemented("OOFPosRelMgr::getAvailWidthOfChild");
return 0;
}
int OOFPosRelMgr::getAvailHeightOfChild (Widget *child, bool forceValue)
{
- assertNotReached ();
+ notImplemented ("OOFPosRelMgr::getAvailHeightOfChild");
return 0;
}
diff --git a/dw/ui.cc b/dw/ui.cc
index c95160a4..62b91d5f 100644
--- a/dw/ui.cc
+++ b/dw/ui.cc
@@ -230,14 +230,14 @@ void Resource::sizeAllocate (Allocation *allocation)
int Resource::getAvailWidthOfChild (Widget *child, bool forceValue)
{
// Only used when the resource contains other dillo widgets.
- misc::assertNotReached ();
+ misc::notImplemented ("Resource::getAvailWidthOfChild");
return 0;
}
int Resource::getAvailHeightOfChild (Widget *child, bool forceValue)
{
// Only used when the resource contains other dillo widgets.
- misc::assertNotReached ();
+ misc::notImplemented ("Resource::getAvailHeightOfChild");
return 0;
}
@@ -247,14 +247,14 @@ void Resource::correctRequisitionOfChild (Widget *child,
int*))
{
// Only used when the resource contains other dillo widgets.
- misc::assertNotReached ();
+ misc::notImplemented ("Resource::correctRequisitionOfChild");
}
void Resource::correctExtremesOfChild (Widget *child, Extremes *extremes,
bool useAdjustmentWidth)
{
// Only used when the resource contains other dillo widgets.
- misc::assertNotReached ();
+ misc::notImplemented ("Resource::correctExtremesOfChild");
}
void Resource::containerSizeChangedForChildren ()
diff --git a/dw/widget.cc b/dw/widget.cc
index 005fa976..626144f2 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -1110,7 +1110,7 @@ int Widget::numSizeRequestReferences ()
Widget *Widget::sizeRequestReference (int index)
{
- misc::assertNotReached ();
+ misc::notImplemented ("Widget::sizeRequestReference");
return NULL;
}
@@ -1121,7 +1121,7 @@ int Widget::numGetExtremesReferences ()
Widget *Widget::getExtremesReference (int index)
{
- misc::assertNotReached ();
+ misc::notImplemented ("Widget::getExtremesReference");
return NULL;
}
@@ -1616,7 +1616,7 @@ void Widget::sizeRequestImpl (Requisition *requisition, int numPos,
void Widget::sizeRequestSimpl (Requisition *requisition)
{
// Either variant should be implemented.
- misc::assertNotReached ();
+ misc::notImplemented ("Widget::sizeRequestSimpl");
}
void Widget::getExtremesImpl (Extremes *extremes, int numPos,
@@ -1631,7 +1631,7 @@ void Widget::getExtremesImpl (Extremes *extremes, int numPos,
void Widget::getExtremesSimpl (Extremes *extremes)
{
// Either variant should be implemented.
- misc::assertNotReached ();
+ misc::notImplemented ("Widget::getExtremesSimpl");
}
void Widget::sizeAllocateImpl (Allocation *allocation)
@@ -1974,7 +1974,7 @@ void Widget::leaveNotifyImpl (EventCrossing *)
void Widget::removeChild (Widget *child)
{
// Should be implemented.
- misc::assertNotReached ();
+ misc::notImplemented ("Widget::removeChild");
}
// ----------------------------------------------------------------------
diff --git a/lout/misc.hh b/lout/misc.hh
index 946ed821..24578f02 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -38,6 +38,12 @@ inline void assertNotReached ()
abort ();
}
+inline void notImplemented (const char *name)
+{
+ fprintf (stderr, "*** [%s] Not implemented: %s ***\n", prgName, name);
+ abort ();
+}
+
inline int roundInt(double d)
{
return (int) ((d > 0) ? (d + 0.5) : (d - 0.5));