When you do an xdmp:eval, that is its own request, and the XQuery that you 
specify is a separate request.  So if you put a try/catch around the eval, it 
will catch any errors thrown by the query within the try.  For example, if you 
run the following:

xquery version "1.0-ml";

try{
xdmp:eval("blah")}
catch ($e) { $e }

It will return the XML stack trace from the inner query (which is a syntax 
error in this case - XDMP-CONTEXT).

If the inner query ran and was canceled, that exception would be caught be the 
outer program (the eval).

Clear as mud?
-Danny


From: [email protected] 
[mailto:[email protected]] On Behalf Of Selvakumar 
Murugesan
Sent: Wednesday, April 18, 2012 11:27 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] XDMP-CANCELED

Hi Danny,

What you meant by both request?

Best Regards,
Selva


On Wed, Apr 18, 2012 at 1:45 PM, Danny Sokolsky 
<[email protected]<mailto:[email protected]>> wrote:
If this is wrapped in an eval or an invoke, then it is probably possible to 
catch this exception.  But likely both requests would be canceled at the same 
time so it might be tricky...

-Danny

From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Geert Josten
Sent: Wednesday, April 18, 2012 10:31 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] XDMP-CANCELED

Hi Selva,

It is an indication that the request was terminated (canceled) from outside the 
request, so you cannot catch that exception from inside the request itself. It 
could be that the user in the browser canceled the request (by interrupting the 
load), or some admin killed the task on the MarkLogic host. In case the user 
canceled it, not sure you can catch that in your user interface. A server-side 
cancel should I think return a 500 with XDMP-CANCELED in the response body..

Kind regards,
Geert

Van: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 Namens Selvakumar Murugesan
Verzonden: woensdag 18 april 2012 19:03
Aan: MarkLogic Developer Discussion
Onderwerp: [MarkLogic Dev General] XDMP-CANCELED

I am trying to load 275 mb files into marklogic.  I got the below error message 
from my logs.

XDMP-CANCELED: cts:search(fn:doc(), 
cts:and-query((cts:collection-query($dictionary), 
cts:collection-query("Process")))) -- Canceled request "/process.xqy"
I have a interface to upload the marklogic file. Can i catch this exception in 
my interface?

Best Regards,
Selva

_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to