mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: use TypeError instead of generic Error when appropriate (#39209)
refactor: use TypeError instead of generic Error when appropriate
This commit is contained in:
@@ -13,7 +13,7 @@ Object.defineProperty(WebFrameMain.prototype, 'ipc', {
|
||||
|
||||
WebFrameMain.prototype.send = function (channel, ...args) {
|
||||
if (typeof channel !== 'string') {
|
||||
throw new Error('Missing required channel argument');
|
||||
throw new TypeError('Missing required channel argument');
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -25,7 +25,7 @@ WebFrameMain.prototype.send = function (channel, ...args) {
|
||||
|
||||
WebFrameMain.prototype._sendInternal = function (channel, ...args) {
|
||||
if (typeof channel !== 'string') {
|
||||
throw new Error('Missing required channel argument');
|
||||
throw new TypeError('Missing required channel argument');
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user