@@ -24,7 +24,7 @@ var clampIndex = require( '@stdlib/ndarray-base-clamp-index' );
24
24
var wrapIndex = require ( '@stdlib/ndarray-base-wrap-index' ) ;
25
25
var normalize = require ( '@stdlib/ndarray-base-normalize-index' ) ;
26
26
var isIndexMode = require ( '@stdlib/ndarray-base-assert-is-index-mode' ) ;
27
- var format = require ( '@stdlib/string-format ' ) ;
27
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
28
28
29
29
30
30
// VARIABLES //
@@ -60,7 +60,7 @@ var TABLE = {
60
60
*/
61
61
function throwIfOutOfBounds ( idx , max ) {
62
62
if ( idx < 0 || idx > max ) {
63
- throw new RangeError ( format ( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`. ' , max , idx ) ) ;
63
+ throw new RangeError ( format ( '0ilFB ' , max , idx ) ) ;
64
64
}
65
65
return idx ;
66
66
}
@@ -87,7 +87,7 @@ function throwIfOutOfBounds( idx, max ) {
87
87
function normalizeIndex ( idx , max ) {
88
88
var index = normalize ( idx , max ) ;
89
89
if ( index < 0 || index > max ) {
90
- throw new RangeError ( format ( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`. ' , max , idx ) ) ;
90
+ throw new RangeError ( format ( '0ilFB ' , max , idx ) ) ;
91
91
}
92
92
return index ;
93
93
}
@@ -152,7 +152,7 @@ function normalizeIndex( idx, max ) {
152
152
*/
153
153
function factory ( mode ) {
154
154
if ( ! isIndexMode ( mode ) ) {
155
- throw new TypeError ( format ( 'invalid argument. First argument must be a recognized index mode. Value: `%s`. ' , mode ) ) ;
155
+ throw new TypeError ( format ( '0ilFC ' , mode ) ) ;
156
156
}
157
157
return TABLE [ mode ] ;
158
158
}
0 commit comments