Ignore:
Timestamp:
Dec 25, 2007, 1:51:27 AM (14 years ago)
Author:
Peter Johansson
Message:

improved error message when config file is invalid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.h

    r519 r522  
    2929#include <iostream>
    3030#include <map>
     31#include <stdexcept>
    3132#include <string>
    3233#include <utility>
     
    141142  std::string trans_beg_code(std::string);
    142143
     144  /**
     145     Trim \a c from beginning and end of string \a str;
     146     
     147     \return resulting string
     148
     149     \throw if first or last character of \a str is NOT character \a c
     150  */
     151  std::string trim(std::string str, char c);
     152
     153  /**
     154     \brief Class for errors when reading config file.
     155   */
     156  class Config_error : public std::runtime_error
     157  {
     158  public:
     159    Config_error(const std::string& line, const std::string& message);
     160  };
     161
    143162}} // end of namespace svndigest and namespace theplu
    144163
Note: See TracChangeset for help on using the changeset viewer.