base-x
base-x copied to clipboard
Specify the character failing in the decode error
See: https://github.com/cryptocoinjs/base-x/blob/master/index.js#L81
Suggest something like: The character ${char} is not found in base${base} alphabet: ${alphabet}
May get around to a pull request myself at some point
I'll take this on eventually, but a PR would be welcome!
This also will need major bump, right? :)
@fanatid I suppose so, assuming error messages are being matched exactly.
If we just did:
throw new Error('Non-base' + BASE + ' character')
to
throw new Error('Non-base' + BASE + ' character (' + char + ')')
It might not need a major bump?
It's a semver world. :( :)
@sublimator PR? :D
See the name parameter approach I might take in https://github.com/cryptocoinjs/base-x/pull/42