Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba90fc1

Browse files
committed
Transform error messages
1 parent ac5e29d commit ba90fc1

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
@@ -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

Lines changed: 1 addition & 1 deletion
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.3.0",
42-
"@stdlib/string-format": "^0.2.2",
42+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4343
"@stdlib/types": "^0.4.3",
4444
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4545
},

0 commit comments

Comments
 (0)