Changeset 1221
- Timestamp:
- Oct 13, 2010, 4:45:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/SVN.cc
r1219 r1221 38 38 #include <subversion-1/svn_subst.h> 39 39 40 #include <sstream>41 40 #include <string> 42 41 … … 49 48 { 50 49 ref_count_ = new int(1); 50 if (error_) { 51 apr_size_t bufsize=255; 52 char buf[255]; 53 msg_ = svn_err_best_message(error_, buf, bufsize); 54 } 55 if (msg.size()) { 56 msg_ += msg; 57 } 51 58 } 52 59 … … 61 68 SVNException::~SVNException(void) throw() 62 69 { 63 -- ref_count_;64 if (! ref_count_) {70 --(*ref_count_); 71 if (!(*ref_count_)) { 65 72 delete ref_count_; 66 73 ref_count_=NULL; … … 73 80 const char* SVNException::what(void) const throw() 74 81 { 75 std::stringstream ss; 76 if (error_) { 77 apr_size_t bufsize=255; 78 char buf[255]; 79 ss << svn_err_best_message(error_, buf, bufsize); 80 } 81 if (msg_.size()) { 82 ss << msg_; 83 } 84 85 return ss.str().c_str(); 82 return msg_.c_str(); 86 83 } 87 84
Note: See TracChangeset
for help on using the changeset viewer.