Project

Profile

Help

Bug #3440

closed

Handling asynchronous document fetch failures

Added by Debbie Lockett over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
2017-09-13
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
1.0, Trunk
Fix Committed on JS Branch:
1.0, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Asynchronous document fetches are achieved using ixsl:schedule-action/@document. However failures are not handled properly.

Using Saxon-JS 1.0.1 (or earlier), if the requested document in ixsl:schedule-action/@document is not returned, then this always results in an uncaught XError.

An error should only get raised from a subsequent call to doc(), while doc-available() should return false.

Actions #1

Updated by Debbie Lockett over 6 years ago

Added JS unit test ixsl2/schedule02 which uses doc-available() within called template, where document fetch fails. (Plus comparison test ixsl2/schedule03 where document fetch succeeds.)

Actions #2

Updated by Debbie Lockett over 6 years ago

  • Status changed from New to Resolved
  • Fix Committed on JS Branch 1.0, Trunk added

Changed the code so now if an asynchronous document fetch fails, then an entry is added to the document pool (with the URI as the key and the XError as the value); rather than throwing the error immediately. When we subsequently try to access the document from the pool, we pick up the XError - so the doc() and doc-available() functions will work correctly.

Fix committed on 1.0 and trunk branches.

Actions #3

Updated by Debbie Lockett over 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.0.2

Bug fix applied in Saxon-JS 1.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page