Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d42c339

Browse filesBrowse files
committed
Transform error messages
1 parent 2a8ecc6 commit d42c339
Copy full SHA for d42c339

File tree

Expand file treeCollapse file tree

2 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-5
lines changed

‎lib/main.js

Copy file name to clipboardExpand all lines: lib/main.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
2424
var defineProperty = require( '@stdlib/utils-define-property' );
2525
var setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );
2626
var float64ToFloat32 = require( '@stdlib/number-float64-base-to-float32' );
27-
var format = require( '@stdlib/string-format' );
27+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2828
var toStr = require( './tostring.js' );
2929
var toJSON = require( './tojson.js' );
3030

@@ -48,13 +48,13 @@ var toJSON = require( './tojson.js' );
4848
*/
4949
function Complex64( real, imag ) {
5050
if ( !( this instanceof Complex64 ) ) {
51-
throw new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );
51+
throw new TypeError( format('null0G') );
5252
}
5353
if ( !isNumber( real ) ) {
54-
throw new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );
54+
throw new TypeError( format( 'null3e', real ) );
5555
}
5656
if ( !isNumber( imag ) ) {
57-
throw new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );
57+
throw new TypeError( format( 'null3f', imag ) );
5858
}
5959
defineProperty( this, 're', {
6060
'configurable': false,

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"dependencies": {
4242
"@stdlib/assert-is-number": "^0.2.2",
4343
"@stdlib/number-float64-base-to-float32": "^0.2.2",
44-
"@stdlib/string-format": "^0.2.2",
44+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4545
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
4646
"@stdlib/utils-define-property": "^0.2.4",
4747
"@stdlib/utils-library-manifest": "^0.2.2",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.