haxe-like enum switch by throwing

http://haxe.org/ref/enums