Add message to stack
This commit is contained in:
parent
efcb9ce08b
commit
d29d8d267d
|
@ -14,7 +14,7 @@ var formatMessage = function(message) {
|
||||||
var defineElement = function(fullName, baseClass, message) {
|
var defineElement = function(fullName, baseClass, message) {
|
||||||
return fullName + ' = function() {\n' +
|
return fullName + ' = function() {\n' +
|
||||||
' this.message = ' + formatMessage(message) + ';\n' +
|
' this.message = ' + formatMessage(message) + ';\n' +
|
||||||
' this.stack = (new Error()).stack;\n' +
|
' this.stack = this.message + \'\\n\' + (new Error()).stack;\n' +
|
||||||
'};\n' +
|
'};\n' +
|
||||||
fullName + '.prototype = Object.create(' + baseClass + '.prototype);\n' +
|
fullName + '.prototype = Object.create(' + baseClass + '.prototype);\n' +
|
||||||
fullName + '.prototype.name = "' + fullName + '";\n\n';
|
fullName + '.prototype.name = "' + fullName + '";\n\n';
|
||||||
|
|
|
@ -4,7 +4,7 @@ module.exports = [{
|
||||||
errors: [
|
errors: [
|
||||||
{
|
{
|
||||||
name: 'InvalidArgument',
|
name: 'InvalidArgument',
|
||||||
message: 'HDPrivateKey: Invalid Argument {0}, expected {1} but got {2}',
|
message: 'Invalid Argument {0}, expected {1} but got {2}',
|
||||||
errors: [{
|
errors: [{
|
||||||
name: 'InvalidB58Char',
|
name: 'InvalidB58Char',
|
||||||
message: 'Invalid Base58 character: {0} in {1}'
|
message: 'Invalid Base58 character: {0} in {1}'
|
||||||
|
@ -48,7 +48,7 @@ module.exports = [{
|
||||||
errors: [
|
errors: [
|
||||||
{
|
{
|
||||||
name: 'InvalidArgument',
|
name: 'InvalidArgument',
|
||||||
message: 'HDPublicKey: Invalid Argument {0}, expected {1} but got {2}',
|
message: 'Invalid Argument {0}, expected {1} but got {2}',
|
||||||
errors: [{
|
errors: [{
|
||||||
name: 'ArgumentIsPrivateExtended',
|
name: 'ArgumentIsPrivateExtended',
|
||||||
message: 'Argument is an extended private key: {0}'
|
message: 'Argument is an extended private key: {0}'
|
||||||
|
|
Loading…
Reference in New Issue