createGroupStructure cannot currently handle passing back an H5File (in the no groups case). It is a bug in HDF5. Once fixed, the if-else cases should be collapsed into one.
Extend with SFINAE and constexpr type detection for InvalidValueClass and CloseMethod. If these are not specified as template parameters, then they must be passed in the constructor.
Detect if inherits from std::exception or not. If inheritable, check if it is an xError. If yes, push a new context. If not inheritable, push a new context with what() as the expression. If not an exception, then create a new xError and push the appropriate type in a context.