8000 Transform error messages · stdlib-js/ndarray-base-bind2vind@a32b005 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit a32b005

Browse files
committed
Transform error messages
1 parent 790e78d commit a32b005

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
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var format = require( '@stdlib/string-format' );
23+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2424
var trunc = require( '@stdlib/math-base-special-trunc' );
2525
var abs = require( '@stdlib/math-base-special-abs' );
2626

@@ -88,7 +88,7 @@ function bind2vind( shape, strides, offset, order, idx, mode ) {
8888
idx += len;
8989
}
9090
if ( idx < 0 || idx >= len ) {
91-
throw new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );
91+
throw new RangeError( format( '0i35E', len, idx ) );
9292
}
9393
}
9494
// The approach which follows is to resolve a buffer index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the array view (i.e., where all strides are positive and offset is 0)...

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@stdlib/math-base-special-trunc": "^0.2.2",
4444
"@stdlib/ndarray-index-modes": "^0.2.2",
4545
"@stdlib/ndarray-orders": "^0.2.2",
46-
"@stdlib/string-format": "^0.2.2",
46+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4747
"@stdlib/types": "^0.4.3",
4848
"@stdlib/utils-library-manifest": "^0.2.2",
4949
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"

0 commit comments

Comments
 (0)
0