Ignore:
Timestamp:
May 11, 2007, 10:42:04 PM (14 years ago)
Author:
Peter Johansson
Message:

added some check if config file is valid fixes #181

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.cc

    r303 r304  
    8484          std::stringstream mess;
    8585          mess << "svndigest: invalid config file: "
    86                << "in copright-alias section" << key + "defined twice.";
     86               << "in copright-alias section " << key + " defined twice.";
    8787          throw std::runtime_error(mess.str());
    8888        }
     
    9696        getline(ss, tmp);
    9797        std::string value = trim(tmp);
    98         if (key=="trac-ticket"){
    99           std::cerr << "svndigest: warning: config variable trac-ticket "
    100                     << "is deprecated. Use trac-root instead.\n";
    101           trac_root_ = value.substr(0,value.size()-7);
    102         }
    103         if (key=="trac-revision"){
    104           std::cerr << "svndigest: warning: config variable trac-revision "
    105                     << "is deprecated. Use trac-root instead.\n";
    106           trac_root_ = value.substr(0,value.size()-10);
    107         }
    10898        if (key=="trac-root")
    10999          trac_root_=value;
     100        else {
     101          std::stringstream mess;
     102          mess << "svndigest: invalid config file: "
     103               << "in trac section" << key + " is invalid option.";
     104          throw std::runtime_error(mess.str());
     105        }
    110106      }
    111107    }
Note: See TracChangeset for help on using the changeset viewer.