Use C++ chained batch
move C++ error handling for chained batch to JS