Throw if preview mode is used in non-debug builds.