[internal] replace assertions w/exceptions for `enum` & `constant`; update tests accordingly