code: @Override
      public void setSetting(String setting) throws CDKException {
          if (settings.contains(setting)) {
              this.setting = setting;
          } else {
              throw new CDKException("Setting " + setting + " is not allowed.");
          }
      }
docs: Sets the setting for a certain question. It will throw
  a CDKException when the setting is not valid.