Skip to content

Commit 523b380

Browse files
committed
refactor: update error message interpolation
1 parent 722452c commit 523b380

File tree

2 files changed

+4
-4
lines changed
  • lib/node_modules/@stdlib/array

2 files changed

+4
-4
lines changed

Diff for: lib/node_modules/@stdlib/array/complex128/lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2633,14 +2633,14 @@ setReadOnly( Complex128Array.prototype, 'toLocaleString', function toLocaleStrin
26332633
} else if ( isString( locales ) || isStringArray( locales ) ) {
26342634
loc = locales;
26352635
} else {
2636-
throw new TypeError( 'invalid argument. First argument must be a string or an array of strings. Value: `' + locales + '`.' );
2636+
throw new TypeError( format( 'invalid argument. First argument must be a string or an array of strings. Value: `%s`.', locales ) );
26372637
}
26382638
if ( arguments.length < 2 ) {
26392639
opts = {};
26402640
} else if ( isObject( options ) ) {
26412641
opts = options;
26422642
} else {
2643-
throw new TypeError( 'invalid argument. Options argument must be an object. Value: `' + options + '`.' );
2643+
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
26442644
}
26452645
buf = this._buffer;
26462646
out = [];

Diff for: lib/node_modules/@stdlib/array/complex64/lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2631,14 +2631,14 @@ setReadOnly( Complex64Array.prototype, 'toLocaleString', function toLocaleString
26312631
} else if ( isString( locales ) || isStringArray( locales ) ) {
26322632
loc = locales;
26332633
} else {
2634-
throw new TypeError( 'invalid argument. First argument must be a string or an array of strings. Value: `' + locales + '`.' );
2634+
throw new TypeError( format( 'invalid argument. First argument must be a string or an array of strings. Value: `%s`.', locales ) );
26352635
}
26362636
if ( arguments.length < 2 ) {
26372637
opts = {};
26382638
} else if ( isObject( options ) ) {
26392639
opts = options;
26402640
} else {
2641-
throw new TypeError( 'invalid argument. Options argument must be an object. Value: `' + options + '`.' );
2641+
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
26422642
}
26432643
buf = this._buffer;
26442644
out = [];

0 commit comments

Comments
 (0)