refactor: use TypeError
instead of generic Error
when appropriate (#39209)
refactor: use TypeError instead of generic Error when appropriate
This commit is contained in:
parent
77cc1d6ffa
commit
455f57322f
9 changed files with 13 additions and 13 deletions
|
@ -411,7 +411,7 @@ WebContents.prototype.getPrintersAsync = async function () {
|
|||
|
||||
WebContents.prototype.loadFile = function (filePath, options = {}) {
|
||||
if (typeof filePath !== 'string') {
|
||||
throw new Error('Must pass filePath as a string');
|
||||
throw new TypeError('Must pass filePath as a string');
|
||||
}
|
||||
const { query, search, hash } = options;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue