Skip to content

Commit

Permalink
[tfjs-node] replace Exception with Error constructor (#7131)
Browse files Browse the repository at this point in the history
fixes #7125

Co-authored-by: Matthew Soulanille <msoulanille@google.com>
  • Loading branch information
pyu10055 and mattsoulanille committed Dec 1, 2022
1 parent a4607aa commit ec16c5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tfjs-node/scripts/deps-constants.js
Expand Up @@ -83,7 +83,7 @@ if (os.platform() === 'win32') {
destLibTensorFlowName += '.so';
destLibTensorFlowFrameworkName += '.so';
} else {
throw Exception('Unsupported platform: ' + os.platform());
throw new Error('Unsupported platform: ' + os.platform());
}

const depsPath = join(__dirname, '..', 'deps');
Expand Down Expand Up @@ -117,6 +117,6 @@ module.exports = {
PLATFORM_MAPPING,
PLATFORM_EXTENSION,
ALL_SUPPORTED_COMBINATION,
customTFLibUri: customBinaries['tf-lib'],
customAddon: customBinaries['addon']
customTFLibUri : customBinaries['tf-lib'],
customAddon : customBinaries['addon']
};
2 changes: 1 addition & 1 deletion tfjs-node/scripts/deps-stage.js
Expand Up @@ -35,7 +35,7 @@ let targetDir = process.argv[3];
// This file is Windows only - the libraries must be placed in the correct
// directory to work.
if (os.platform() !== 'win32') {
throw new Exception('Dep staging is only supported on Windows');
throw new Error('Dep staging is only supported on Windows');
}

// Some windows machines contain a trailing " char:
Expand Down

0 comments on commit ec16c5f

Please sign in to comment.