v2.0.3: show error message rather than throwing when attempting ursa

This commit is contained in:
AJ ONeal 2018-12-28 08:39:25 -07:00
parent 0b5850cf6a
commit 4d11f99d88
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,8 @@ module.exports = function (bitlen, exp) {
return require('./generate-privkey-ursa.js')(bitlen, exp); return require('./generate-privkey-ursa.js')(bitlen, exp);
} catch(e) { } catch(e) {
if (e.code !== 'MODULE_NOT_FOUND') { if (e.code !== 'MODULE_NOT_FOUND') {
throw e; console.error("[rsa-compat] Unexpected error when using 'ursa':");
console.error(e);
} }
if (!oldver) { if (!oldver) {
oldver = true; oldver = true;

View File

@ -1,6 +1,6 @@
{ {
"name": "rsa-compat", "name": "rsa-compat",
"version": "2.0.2", "version": "2.0.3",
"engines" : { "engines" : {
"node" : ">=10.12" "node" : ">=10.12"
}, },