Open josephguillaume opened 4 years ago
On error, callback is called (https://github.com/linkeddata/rdflib.js/blob/master/src/jsonldparser.js#L97) but this is actually executeCallback (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L55), which does not do any error handling (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L81)
callback
executeCallback
It appears the fix is to simple delete .catch(callback) to allow the error to be caught by executeErrorCallback (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L66)
.catch(callback)
executeErrorCallback
On error,
callback
is called (https://github.com/linkeddata/rdflib.js/blob/master/src/jsonldparser.js#L97) but this is actuallyexecuteCallback
(https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L55), which does not do any error handling (https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L81)It appears the fix is to simple delete
.catch(callback)
to allow the error to be caught byexecuteErrorCallback
(https://github.com/linkeddata/rdflib.js/blob/master/src/parse.ts#L66)