|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Getting the Cause from a ClientException Stopped Working in 1.2.0beta4Hello,
I have some code which does an update. When the update is finished I check to see if I got an error code indicating a duplicate update. If I did then I want to get the file which caused this error. I have some code that looks like this: SVNException svnException = (SVNException) clientException.getCause(); SVNErrorMessage err = svnException.getErrorMessage(); Object[] objects = err.getRelatedObjects(); return (String) objects[0]; This all worked fine when using SVNKit 1.1.8. I have recently upgraded to version 1.2.0beta4 and it stopped working. clientException.getCause() is always returning null. Is this a known difference? Is there some other way I should be getting the actual path to the duplicate file? Thanks in advance for the help, Zack --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
RE: Getting the Cause from a ClientException Stopped Working in 1.2.0beta4Hello,
I looked into this issue a little more. The issue is in JavaHLObjectFactory.java line 724. At this point a new ClientException is created and the SVNException is not set as the cause of that exception. The line looks like this: ClientException ec = new ClientException(e.getMessage(), null, code); It would be great if it looked like this instead: ClientException ec = new ClientException(e.getMessage(), null, code, e); This would require some changes to the parent classes to pass the argument through the constructors back to Throwable, but it would be great to have that information there. Thanks, Zack > -----Original Message----- > From: Zack Grossbart [mailto:zgrossbart@...] > Sent: Monday, August 04, 2008 1:31 PM > To: svnkit-users@... > Subject: Getting the Cause from a ClientException Stopped Working in > 1.2.0beta4 > > > Hello, > > I have some code which does an update. When the update is finished I > check to see if I got an error code indicating a duplicate update. > If I did then I want to get the file which caused this error. I have > some code that looks like this: > > SVNException svnException = (SVNException) clientException.getCause(); > SVNErrorMessage err = svnException.getErrorMessage(); > Object[] objects = err.getRelatedObjects(); > return (String) objects[0]; > > This all worked fine when using SVNKit 1.1.8. I have recently > upgraded to version 1.2.0beta4 and it stopped working. > clientException.getCause() is always returning null. Is this a known > difference? Is there some other way I should be getting the actual > path to the duplicate file? > > Thanks in advance for the help, > Zack --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Getting the Cause from a ClientException Stopped Working in 1.2.0beta4Hello Zack,
Thanks a lot for reporting this issue. We changed our Java HL code to provide the same behavior (similar to svnkit 1.1.x versions) so you can get information you need by getting the cause of ClientException. These changes are available at r4662 of 1.2.x branch. Zack Grossbart wrote: > Hello, > > I looked into this issue a little more. The issue is in > JavaHLObjectFactory.java line 724. At this point a new ClientException is > created and the SVNException is not set as the cause of that exception. The > line looks like this: > > ClientException ec = new ClientException(e.getMessage(), null, code); > > It would be great if it looked like this instead: > > ClientException ec = new ClientException(e.getMessage(), null, code, e); > > This would require some changes to the parent classes to pass the argument > through the constructors back to Throwable, but it would be great to have that > information there. > > Thanks, > Zack > > >> -----Original Message----- >> From: Zack Grossbart [mailto:zgrossbart@...] >> Sent: Monday, August 04, 2008 1:31 PM >> To: svnkit-users@... >> Subject: Getting the Cause from a ClientException Stopped Working in >> 1.2.0beta4 >> >> >> Hello, >> >> I have some code which does an update. When the update is finished I >> check to see if I got an error code indicating a duplicate update. >> If I did then I want to get the file which caused this error. I have >> some code that looks like this: >> >> SVNException svnException = (SVNException) clientException.getCause(); >> SVNErrorMessage err = svnException.getErrorMessage(); >> Object[] objects = err.getRelatedObjects(); >> return (String) objects[0]; >> >> This all worked fine when using SVNKit 1.1.8. I have recently >> upgraded to version 1.2.0beta4 and it stopped working. >> clientException.getCause() is always returning null. Is this a known >> difference? Is there some other way I should be getting the actual >> path to the duplicate file? >> >> Thanks in advance for the help, >> Zack >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > For additional commands, e-mail: svnkit-users-help@... > > > > -- Semen Vadishev TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
RE: Getting the Cause from a ClientException Stopped Working in 1.2.0beta4Hello Semen,
That fixed my issue exactly. Thank you very much. Cheers, Zack > -----Original Message----- > From: Semen Vadishev [mailto:Semen.Vadishev@...] > Sent: Tuesday, August 05, 2008 9:34 AM > To: svnkit-users@... > Subject: Re: Getting the Cause from a ClientException Stopped Working in > 1.2.0beta4 > > > Hello Zack, > > Thanks a lot for reporting this issue. We changed our Java HL code to > provide the same behavior (similar to svnkit 1.1.x versions) so you can > get information you need by getting the cause of ClientException. These > changes are available at r4662 of 1.2.x branch. > > Zack Grossbart wrote: > > Hello, > > > > I looked into this issue a little more. The issue is in > > JavaHLObjectFactory.java line 724. At this point a new ClientException is > > created and the SVNException is not set as the cause of that exception. The > > line looks like this: > > > > ClientException ec = new ClientException(e.getMessage(), null, code); > > > > It would be great if it looked like this instead: > > > > ClientException ec = new ClientException(e.getMessage(), null, code, e); > > > > This would require some changes to the parent classes to pass the argument > > through the constructors back to Throwable, but it would be great > to have that > > information there. > > > > Thanks, > > Zack > > > > > >> -----Original Message----- > >> From: Zack Grossbart [mailto:zgrossbart@...] > >> Sent: Monday, August 04, 2008 1:31 PM > >> To: svnkit-users@... > >> Subject: Getting the Cause from a ClientException Stopped Working in > >> 1.2.0beta4 > >> > >> > >> Hello, > >> > >> I have some code which does an update. When the update is finished I > >> check to see if I got an error code indicating a duplicate update. > >> If I did then I want to get the file which caused this error. I have > >> some code that looks like this: > >> > >> SVNException svnException = (SVNException) clientException.getCause(); > >> SVNErrorMessage err = svnException.getErrorMessage(); > >> Object[] objects = err.getRelatedObjects(); > >> return (String) objects[0]; > >> > >> This all worked fine when using SVNKit 1.1.8. I have recently > >> upgraded to version 1.2.0beta4 and it stopped working. > >> clientException.getCause() is always returning null. Is this a known > >> difference? Is there some other way I should be getting the actual > >> path to the duplicate file? > >> > >> Thanks in advance for the help, > >> Zack > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > > For additional commands, e-mail: svnkit-users-help@... > > > > > > > > > > -- > Semen Vadishev > TMate Software, > http://svnkit.com/ - Java [Sub]Versioning Library! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > For additional commands, e-mail: svnkit-users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
| Free Forum Powered by Nabble | Forum Help |