From e261a09d8eb05c655e7167feb8efeca510497ea8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 29 Apr 2026 03:32:55 +0000 Subject: [PATCH] Transform error messages --- lib/polyfill.js | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/polyfill.js b/lib/polyfill.js index 0fb9518..e86b7dd 100644 --- a/lib/polyfill.js +++ b/lib/polyfill.js @@ -18,6 +18,8 @@ 'use strict'; +var format = require('@stdlib/error-tools-fmtprodmsg'); + // MAIN // /** @@ -27,10 +29,9 @@ * @throws {Error} not implemented */ function polyfill( size ) { // eslint-disable-line no-unused-vars - 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.' ); + throw new Error( format('01T09') ); } - // EXPORTS // module.exports = polyfill; diff --git a/package.json b/package.json index e2b00e9..08fc7bc 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@stdlib/math-base-special-pow": "^0.3.1", "@stdlib/number-uint8-base-to-binary-string": "^0.2.3", "@stdlib/random-base-randu": "^0.2.3", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "proxyquire": "^2.0.0", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1",