diff --git a/lib/eckles.js b/lib/eckles.js index 40511ad..db2b1e5 100644 --- a/lib/eckles.js +++ b/lib/eckles.js @@ -336,11 +336,11 @@ EC.exportSync = function (opts) { if (!format || 'sec1' === format) { format = 'sec1'; } else if ('pkcs8' !== format) { - throw new Error("options.format must be 'sec1' or 'pkcs8' for private EC keys"); + throw new Error("options.format must be 'sec1' or 'pkcs8' for private EC keys, not '" + format + "'"); } } if (-1 === [ 'P-256', 'P-384' ].indexOf(jwk.crv)) { - throw new Error("options.jwk.crv must be either P-256 or P-384 for EC keys"); + throw new Error("options.jwk.crv must be either P-256 or P-384 for EC keys, not '" + jwk.crv + "'"); } if (!jwk.y) { throw new Error("options.jwk.y must be a urlsafe base64-encoded either P-256 or P-384");