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

Skip to content

Commit 07506d7

Browse files
committed
Transform error messages
1 parent 14686a8 commit 07506d7

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

2525

2626
// MAIN //
@@ -85,7 +85,7 @@ function vind2bind( shape, strides, offset, order, idx, mode ) {
8585
idx += len;
8686
}
8787
if ( idx < 0 || idx >= len ) {
88-
throw new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );
88+
throw new RangeError( format( '0jf5E', len, idx ) );
8989
}
9090
}
9191
// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"dependencies": {
4242
"@stdlib/ndarray-index-modes": "^0.2.2",
4343
"@stdlib/ndarray-orders": "^0.2.2",
44-
"@stdlib/string-format": "^0.2.2",
44+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4545
"@stdlib/types": "^0.4.1",
4646
"@stdlib/utils-library-manifest": "^0.2.2",
4747
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"

0 commit comments

Comments
 (0)
0