Changeset 106


Ignore:
Timestamp:
Jun 28, 2006, 11:07:45 AM (15 years ago)
Author:
Peter Johansson
Message:

closes #43 throwing exceptions in Parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r104 r106  
    9191    struct stat buf;
    9292    // check that root directory exists
    93     if (stat(root_.c_str(),&buf)){
    94       std::cerr << "\nsvnstat: " << root_ << ": No such directory"
    95                 << std::endl;
    96       exit(-1);
    97     }
     93    if (stat(root_.c_str(),&buf))
     94      throw std::runtime_error("\nsvnstat: " + root_ + ": No such directory.");
     95
    9896    // check that target directory exists
    9997    if (stat(targetdir_.c_str(),&buf)){
    100       std::cerr << "\nsvnstat: " << targetdir_ << ": No such directory"
    101                 << std::endl;
    102       exit(-1);
     98      throw std::runtime_error("\nsvnstat: " + targetdir_ +
     99                               ": No such directory.");
    103100    }
    104101  }
Note: See TracChangeset for help on using the changeset viewer.