Throws new exception if the configuration is not set