index.js
/**
   * Returns a string with a description of an error.
   * This function is similar to strerror. The only difference
   * is that it accepts an error (number) returned by a libtasn1 function.
   * @param {number} errcode is an error returned by a libtasn1 function.
   * @returns {string} string describing error code.
   */
Returns a string with a description of an error.
This function is similar to strerror. The only difference
is that it accepts an error (number) returned by a libtasn1 function.
@param {number} errcode is an error returned by a libtasn1 function.
@returns {string} string describing error code.
Returns a string with a description of an error . This function is similar to strerror . The only difference is that it accepts an error ( number ) returned by a libtasn1 function . @param { number } errcode is an error returned by a libtasn1 function . @returns { string } string describing error code .
strerror(errcode) {
    if (typeof errcode !== 'number') {
      throw new TypeError('Expected Number.');
    }
    const ptr = this[_module]._asn1_strerror(errcode);
    if (ptr === 0) {
      throw new Error('Invalid error code');
    }
    return pointer2string(this.memory, ptr);
  }
strerror ( errcode ) { if ( typeof errcode !== 'number' ) { throw new TypeError ( 'Expected Number.' ) ; } const ptr = this [ _module ] . _asn1_strerror ( errcode ) ; if ( ptr === 0 ) { throw new Error ( 'Invalid error code' ) ; } return pointer2string ( this . memory , ptr ) ; }
Returns a string with a description of an error.
Returns a string with a description of an error .