Opened 14 years ago
Closed 13 years ago
#371 closed task (fixed)
throw exception when svn_error_t != NULL
Reported by: | Peter Johansson | Owned by: | Peter Johansson |
---|---|---|---|
Priority: | minor | Milestone: | svndigest 0.9 |
Component: | core | Version: | trunk |
Keywords: | Cc: |
Description
Since class SVN is the gateway to libsvn we only need to do this in the SVN class and we can ignore svn_error_t elsewhere. Needless to say the exception thrown could be caught and other propagate all the way to main.
Change History (10)
comment:1 Changed 13 years ago by
Milestone: | svndigest 0.x+ → svndigest 0.9 |
---|---|
Owner: | changed from Jari Häkkinen to Peter Johansson |
Status: | new → assigned |
comment:2 Changed 13 years ago by
comment:4 Changed 13 years ago by
comment:5 Changed 13 years ago by
comment:6 Changed 13 years ago by
comment:7 Changed 13 years ago by
comment:8 Changed 13 years ago by
Only one problem left before closing this ticket. As now we don't clear svn_error_t. Not a big deal as most (if not all) errors cause an EXIT_FAILURE.
Most logical is probably if SVNException class takes ownership of the error and delete it in the destructor, but... the problem is the interaction with copying of exception class. I tried to declare copy constructor private but then compiler wouldn't throw the exception.
I need to investigate more, but for now we're leaking...
Thoughts?
comment:9 Changed 13 years ago by
implement copy constructor with ref counter seems to be the best solution
comment:10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Two things in SVN::cleanup:
First, the call to
assumes that binary is called svndigest, but that is false for svncopyright of course, so I will try to get rid of that call and communicate the error message to main via an Exception.
Second, in this if statement
it seems the message is only empty when cleanup is called from cleanup_failed_init and then we are throwing anyway after cleanup returned. In other words, the if statement just makes the code complicated to read.