Skip to content

Commit a27f432

Browse files
committed
Transform error messages
1 parent 97228a4 commit a27f432

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
@@ -33,7 +33,7 @@ var numel = require( '@stdlib/ndarray-base-numel' );
3333
var ind2sub = require( '@stdlib/ndarray-base-ind2sub' );
3434
var real = require( '@stdlib/complex-float64-real' );
3535
var imag = require( '@stdlib/complex-float64-imag' );
36-
var format = require( '@stdlib/string-format' );
36+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
3737

3838

3939
// FUNCTIONS //
@@ -87,7 +87,7 @@ function toJSON( x ) {
8787
var i;
8888

8989
if ( !isndarrayLike( x ) ) {
90-
throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );
90+
throw new TypeError( format( 'nullDv', x ) );
9191
}
9292
// Defer to input argument's custom implementation, if already defined...
9393
if ( hasMethod( x, 'toJSON' ) ) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@stdlib/ndarray-order": "^0.2.2",
5050
"@stdlib/ndarray-shape": "^0.2.2",
5151
"@stdlib/ndarray-strides": "^0.2.2",
52-
"@stdlib/string-format": "^0.2.2",
52+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
5353
"@stdlib/types": "^0.4.3",
5454
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
5555
},

0 commit comments

Comments
 (0)