Changeset 659 for trunk


Ignore:
Timestamp:
Jun 11, 2008, 12:58:26 AM (13 years ago)
Author:
Peter Johansson
Message:

add some safety

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVNlog.cc

    r642 r659  
    6666  const Commitment& SVNlog::latest_commit(void) const
    6767  {
     68    assert(commits().size());
    6869    return commits().back();
    6970  }
     
    7677      if (iter->author() == name)
    7778        return *iter;
    78     assert(false);
     79    std::stringstream ss;
     80    ss << __FILE__ << " could not find author: " << name;
     81    throw std::runtime(ss.str());
     82    // let us return something to avoid compiler warnings
     83    return *commits().begin();
    7984  }
    8085
Note: See TracChangeset for help on using the changeset viewer.