Shutting down OpenNI means that OpenNIEngine construction has irretrievably failed. The standard way of handling failures in constructors is to throw (aborting construction of the object) rather than returning (which leaves the object in a partially-constructed and failed state). Partially-constructed objects can be dangerous if people use them as if they were fully-constructed ones. To avoid problems, it's much safer just to never partially construct objects in the first place.
Shutting down OpenNI means that OpenNIEngine construction has irretrievably failed. The standard way of handling failures in constructors is to throw (aborting construction of the object) rather than returning (which leaves the object in a partially-constructed and failed state). Partially-constructed objects can be dangerous if people use them as if they were fully-constructed ones. To avoid problems, it's much safer just to never partially construct objects in the first place.
See also: http://www.gotw.ca/publications/mill13.htm