Project

Profile

Help

Bug #5554

closed

Some initialization errors for asynchronous transforms are not handled correctly

Added by Debbie Lockett over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Sprint/Milestone:
Start date:
2022-06-06
Due date:
% Done:

100%

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

Description

While testing the issue raised in forum post https://saxonica.plan.io/boards/5/topics/8759 ('"Error parsing supplied SEF" when attempting transform using property stylesheetText'), I discovered that there are some cases where we do not correctly handle errors when initializing asynchronous transforms. Specifically, in transform() for asynchronous transforms the SEF and source are loaded asynchronously using promises, and once both are available, the go() function is called. However, there are a couple of cases where errors loading the SEF are thrown directly, rather than returning a rejected promise.

Actions #1

Updated by Debbie Lockett over 2 years ago

  • Status changed from In Progress to Resolved
  • Fix Committed on JS Branch 2, Trunk added

Fix committed on saxonjs2 and main branches: to tidy the code by using Promise.reject() as necessary for these initialization errors.

New saxonapi unit tests added: async-trans-050, -051, -052, -053; async-trans-905, -906, -907; sync-trans-905, -906, -907.

Actions #2

Updated by Norm Tovey-Walsh about 2 years ago

  • Sprint/Milestone set to SaxonJS 2.5
Actions #3

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to SaxonJS 2.5

Fixed in SaxonJS 2.5.

Please register to edit this issue

Also available in: Atom PDF Tracking page