Skip to content

Commit

Permalink
Merge PR #72 from 'nodech/js-fix-errors'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Jun 24, 2023
2 parents 9706a7c + 80ab452 commit 751e060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/encoding/asn1.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class Node extends bio.Struct {
break;
}
default: {
throw new assert.AssertionError('Invalid mode.');
throw new Error('Invalid mode.');
}
}

Expand Down Expand Up @@ -369,7 +369,7 @@ class Node extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid mode.');
throw new Error('Invalid mode.');
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions lib/ssh.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class SSHPublicKey extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid key.');
throw new Error('Invalid key.');
}
}

Expand Down Expand Up @@ -181,7 +181,7 @@ class SSHPublicKey extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid key.');
throw new Error('Invalid key.');
}
}

Expand Down Expand Up @@ -426,7 +426,7 @@ class SSHPrivateKey extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid key.');
throw new Error('Invalid key.');
}
}

Expand Down Expand Up @@ -506,7 +506,7 @@ class SSHPrivateKey extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid key.');
throw new Error('Invalid key.');
}
}

Expand Down Expand Up @@ -588,7 +588,7 @@ class SSHPrivateKey extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid key.');
throw new Error('Invalid key.');
}
}
}
Expand Down Expand Up @@ -622,7 +622,7 @@ class SSHPrivateKey extends bio.Struct {
}

default: {
throw new assert.AssertionError('Invalid key.');
throw new Error('Invalid key.');
}
}

Expand Down

0 comments on commit 751e060

Please sign in to comment.