10000 Transform error messages · stdlib-js/ndarray-base-vind2bind@1e632c6 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 1e632c6

Browse files
committed
Transform error messages
1 parent 0d6fd79 commit 1e632c6

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
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major-string' );
24-
var format = require( '@stdlib/string-format' );
24+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2525

2626

2727
// MAIN //
@@ -86,7 +86,7 @@ function vind2bind( shape, strides, offset, order, idx, mode ) {
8686
idx += len;
8787
}
8888
if ( idx < 0 || idx >= len ) {
89-
throw new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );
89+
throw new RangeError( format( '0jf5E', len, idx ) );
9090
}
9191
}
9292
// 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
@@ -42,7 +42,7 @@
4242
"@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main",
4343
"@stdlib/ndarray-index-modes": "^0.2.2",
4444
"@stdlib/ndarray-orders": "^0.2.2",
45-
"@stdlib/string-format": "^0.2.2",
45+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4646
"@stdlib/types": "^0.4.3",
4747
"@stdlib/utils-library-manifest": "^0.2.2",
4848
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"

0 commit comments

Comments
 (0)
0