Skip to content

Commit 3dfb5b2

Browse files
committed
Transform error messages
1 parent 1d14e9f commit 3dfb5b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var iterationOrder = require( '@stdlib/ndarray-base-iteration-order' );
2424
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2525
var ndarray2object = require( '@stdlib/ndarray-base-ndarraylike2object' );
26-
var format = require( '@stdlib/string-format' );
26+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2727
var blockedaccessormap2d = require( './2d_blocked_accessors.js' );
2828
var blockedaccessormap3d = require( './3d_blocked_accessors.js' );
2929
var blockedaccessormap4d = require( './4d_blocked_accessors.js' );
@@ -226,7 +226,7 @@ function map( arrays, fcn, thisArg ) {
226226
for ( i = 0; i < ndims; i++ ) {
227227
d = shx[ i ];
228228
if ( d !== shy[ i ] ) {
229-
throw new Error( 'invalid arguments. Arrays must have the same shape.' );
229+
throw new Error( format('null0d') );
230230
}
231231
// Note that, if one of the dimensions is `0`, the length will be `0`...
232232
len *= d;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@stdlib/ndarray-base-unary-loop-interchange-order": "^0.2.1",
4949
"@stdlib/ndarray-base-unary-tiling-block-size": "^0.2.2",
5050
"@stdlib/ndarray-base-vind2bind": "^0.2.2",
51-
"@stdlib/string-format": "^0.2.2",
51+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
5252
"@stdlib/types": "^0.4.3",
5353
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
5454
},

0 commit comments

Comments
 (0)