Lookup error classes at runtime and skip those that are not defined.

There is no simple way to before hand verify if a const exists besides
iterating over the components in a const path and checking if each entry
exists, fetch that, and repeat until the last component has been
verified.