]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/container.cpp
Rework exceptions and use maputils
[libs/gltk.git] / source / container.cpp
index 483608a40764a3e3612be9460f5d92a100bd7ab7..bec206602a95248c72f53ad4de28f41444b71659 100644 (file)
@@ -5,6 +5,11 @@ using namespace std;
 namespace Msp {
 namespace GLtk {
 
+hierarchy_error::hierarchy_error(const string &w):
+       logic_error(w)
+{ }
+
+
 Container::Container():
        click_focus(0),
        click_button(0)
@@ -35,7 +40,7 @@ void Container::remove(Widget &wdg)
                        return;
                }
 
-       throw InvalidState("That Widget is not in this Container");
+       throw hierarchy_error("widget not in container");
 }
 
 Container::Child *Container::create_child(Widget *wdg)