Mercurial > projects > mde
comparison mde/gui/exception.d @ 133:9fd705793568
Fixed menu popup bug, improved recursion detection.
Menu popups can now determine whether or not they are sub-menus.
Recursion detection can now also check content (if not the same, there's not a risk of infinite recursion).
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 23 Jan 2009 16:05:05 +0000 |
parents | fe061009029d |
children |
comparison
equal
deleted
inserted
replaced
132:264028f4115a | 133:9fd705793568 |
---|---|
38 this (Object o) { // Default, by Widget class's this / WDCheck | 38 this (Object o) { // Default, by Widget class's this / WDCheck |
39 super ("Bad widget data for "~o.classinfo.name); | 39 super ("Bad widget data for "~o.classinfo.name); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 /// Thrown when a widget is (potentially) being recursed infinitely. | |
44 class WidgetRecursionException : GuiException | |
45 { | |
46 this (char[] id) { // Pass id of widget being recursed | |
47 super ("Infinite recursion of "~id); | |
48 } | |
49 } | |
50 | |
43 class ContentException : GuiException | 51 class ContentException : GuiException |
44 { | 52 { |
45 char[] getSymbol () { | 53 char[] getSymbol () { |
46 return super.getSymbol ~ ".content"; | 54 return super.getSymbol ~ ".content"; |
47 } | 55 } |