Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 288a89a

Browse filesBrowse files
committed
Transform error messages
1 parent ac3a242 commit 288a89a
Copy full SHA for 288a89a

File tree

2 files changed

+6
-4
lines changed
Filter options

2 files changed

+6
-4
lines changed

‎lib/polyfill.js

Copy file name to clipboardExpand all lines: lib/polyfill.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
'use strict';
2020

21+
var format = require('@stdlib/error-tools-fmtprodmsg');
22+
2123
// MAIN //
2224

2325
/**
@@ -27,10 +29,9 @@
2729
* @throws {Error} not implemented
2830
*/
2931
function polyfill( size ) { // eslint-disable-line no-unused-vars
30-
throw new Error( 'not supported. The current environment does not support SharedArrayBuffers, and, unfortunately, SharedArrayBuffers cannot be polyfilled. For shared memory applications, upgrade your runtime environment to one which supports SharedArrayBuffers.' );
32+
throw new Error( format('01T09') );
3133
}
3234

33-
3435
// EXPORTS //
3536

3637
module.exports = polyfill;

‎package.json

Copy file name to clipboardExpand all lines: package.json
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"url": "https://github.com/stdlib-js/stdlib/issues"
3838
},
3939
"dependencies": {
40-
"@stdlib/assert-has-sharedarraybuffer-support": "^0.2.2"
40+
"@stdlib/assert-has-sharedarraybuffer-support": "^0.2.2",
41+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4142
},
4243
"devDependencies": {
4344
"@stdlib/array-float64": "^0.2.2",
@@ -96,4 +97,4 @@
9697
"type": "opencollective",
9798
"url": "https://opencollective.com/stdlib"
9899
}
99-
}
100+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.