Skip to content

Commit 6963395

Browse files
committed
Transform error messages
1 parent cda8063 commit 6963395

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var getType = require( '@stdlib/array-dtype' );
2424
var convert = require( '@stdlib/array-convert' );
25-
var format = require( '@stdlib/string-format' );
25+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2626

2727

2828
// MAIN //
@@ -48,7 +48,7 @@ var format = require( '@stdlib/string-format' );
4848
function convertSame( x, y ) {
4949
var dtype = getType( y );
5050
if ( dtype === null ) {
51-
throw new TypeError( format( 'invalid argument. Second argument must have a recognized/supported data type. Type: `%s`. Value: `%s`.', dtype, y ) );
51+
throw new TypeError( format( '00T2Q', dtype, y ) );
5252
}
5353
return convert( x, dtype );
5454
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@stdlib/array-convert": "^0.2.1",
4141
"@stdlib/array-dtype": "^0.2.1",
42-
"@stdlib/string-format": "^0.2.1",
42+
"@stdlib/error-tools-fmtprodmsg": "^0.2.1",
4343
"@stdlib/types": "^0.3.2",
4444
"@stdlib/error-tools-fmtprodmsg": "^0.2.1"
4545
},

0 commit comments

Comments
 (0)