I have an HTML page that gets its data from a cube.
When the cube is not processed, I get this error:

The cube 'xxx' does not exist, or it is not processed

To avoid this I would like to query the database as to whether the cube 'xxx' has been processed, so that I can take some other action, if it is not.