Skip to content

Commit e440588

Browse files
committed
Transform error messages
1 parent bfc6c33 commit e440588

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/polyfill.js

+3-2
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

+3-2
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)