You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Patrick Mayweg <ma...@qint.de> on 2004/05/23 14:34:44 UTC
[PATCH] I need a new error code
Hi,
I need a new error code for the javahl binding, but I am not sure if I
may just commit my change to svn_error_codes.h
Patrick
Index: subversion/include/svn_error_codes.h
===================================================================
--- subversion/include/svn_error_codes.h (revision 9852)
+++ subversion/include/svn_error_codes.h (working copy)
@@ -853,6 +853,10 @@
SVN_ERR_MISC_CATEGORY_START + 19,
"Incompatible library version")
+ SVN_ERRDEF (SVN_ERR_JAVAHL_EXCEPTION_RECEIVED,
+ SVN_ERR_MISC_CATEGORY_START + 20,
+ "Java exception has been reveived from callback")
+
/* command-line client errors */
SVN_ERRDEF (SVN_ERR_CL_ARG_PARSING_ERROR,
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] I need a new error code
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sun, 23 May 2004, Patrick Mayweg wrote:
> Hi Peter,
>
> Peter N. Lundblad wrote:
>
> >BTW, do you really receive an exception? Don't you catch it?
> >
> >
> Not from native (C) code. When I detect that a java exception has been
> thrown, I normally return to java.
> When I detect a java exception from a java callback method, I have to
> return an error to subversion to end processing. I need this error for
> this case. When I process the error return from the outter subversion
> call, I do not want to throw another exception.
> Patrick
>
I understand that you need an error. Was just asking about terminology.
But you know Java bindnings much better than I...
Best Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] I need a new error code
Posted by Patrick Mayweg <ma...@qint.de>.
Hi Peter,
Peter N. Lundblad wrote:
>On Sun, 23 May 2004, Patrick Mayweg wrote:
>
>
>
>>Index: subversion/include/svn_error_codes.h
>>===================================================================
>>--- subversion/include/svn_error_codes.h (revision 9852)
>>+++ subversion/include/svn_error_codes.h (working copy)
>>@@ -853,6 +853,10 @@
>> SVN_ERR_MISC_CATEGORY_START + 19,
>> "Incompatible library version")
>>
>>+ SVN_ERRDEF (SVN_ERR_JAVAHL_EXCEPTION_RECEIVED,
>>+ SVN_ERR_MISC_CATEGORY_START + 20,
>>+ "Java exception has been reveived from callback")
>>
>>
> ^
>reveived? :-)
>
>
Thanks for correction
>BTW, do you really receive an exception? Don't you catch it?
>
>
Not from native (C) code. When I detect that a java exception has been
thrown, I normally return to java.
When I detect a java exception from a java callback method, I have to
return an error to subversion to end processing. I need this error for
this case. When I process the error return from the outter subversion
call, I do not want to throw another exception.
Patrick
>Regards,
>//Peter
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] I need a new error code
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sun, 23 May 2004, Patrick Mayweg wrote:
> Index: subversion/include/svn_error_codes.h
> ===================================================================
> --- subversion/include/svn_error_codes.h (revision 9852)
> +++ subversion/include/svn_error_codes.h (working copy)
> @@ -853,6 +853,10 @@
> SVN_ERR_MISC_CATEGORY_START + 19,
> "Incompatible library version")
>
> + SVN_ERRDEF (SVN_ERR_JAVAHL_EXCEPTION_RECEIVED,
> + SVN_ERR_MISC_CATEGORY_START + 20,
> + "Java exception has been reveived from callback")
^
reveived? :-)
BTW, do you really receive an exception? Don't you catch it?
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] I need a new error code
Posted by Branko Čibej <br...@xbc.nu>.
Patrick Mayweg wrote:
> Hi,
> I need a new error code for the javahl binding, but I am not sure if I
> may just commit my change to svn_error_codes.h
> Patrick
>
> Index: subversion/include/svn_error_codes.h
> ===================================================================
> --- subversion/include/svn_error_codes.h (revision 9852)
> +++ subversion/include/svn_error_codes.h (working copy)
> @@ -853,6 +853,10 @@
> SVN_ERR_MISC_CATEGORY_START + 19,
> "Incompatible library version")
>
> + SVN_ERRDEF (SVN_ERR_JAVAHL_EXCEPTION_RECEIVED,
> + SVN_ERR_MISC_CATEGORY_START + 20,
> + "Java exception has been reveived from callback")
> +
> /* command-line client errors */
>
> SVN_ERRDEF (SVN_ERR_CL_ARG_PARSING_ERROR,
So let me understand how this looks: you have something like:
Java code -> javahl -> svn library -> javahl -> Java callback
Is that correct? And you want to convert an exception in the Java
callback to an error returned from the javahl callback wrapper to the
svn library. Hm. It seems somehow wrong to add binding-specific errors
to the core error list. OTOH we already have a SWIG/Python specific
error code, so it's not as if you'd be adding anything we've not seen
before. I'd rather see a more generic code, though, that other bindings
can use, too.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org