Skip to content

Commit 66b63ee

Browse files
committed
Update error messages
1 parent cfaa1cb commit 66b63ee

File tree

23 files changed

+33
-33
lines changed

23 files changed

+33
-33
lines changed

lib/node_modules/@stdlib/_tools/links/create/lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function validate( opts, options ) {
6363
}
6464
opts.uri = options.uri;
6565
if ( !isURI( opts.uri ) ) {
66-
return new TypeError( format( 'invalid option. `uri` option must be a valid URI. Option: `%s`.', opts.uri ) );
66+
return new TypeError( format( 'invalid option. `%s` option must be a valid URI. Option: `%s`.', 'uri', opts.uri ) );
6767
}
6868
opts.id = options.id;
6969
if ( !isString( opts.id ) ) {

lib/node_modules/@stdlib/_tools/pkgs/toposort/lib/sort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function sort( pkgs ) {
9090
out[ i ] = pkgs[ out[ i ] ];
9191
}
9292
debug( 'Failed to sort packages. Detected the following dependency chain containing a cycle: %s', out.join( ' -> ' ) );
93-
return new Error( format( 'unexpected error. Failed to sort packages. Detected the following dependency chain containing a cycle: %s', out.join( ' -> ' ) ) );
93+
return new Error( format( 'unexpected error. Failed to sort packages. Detected the following dependency chain containing a cycle: `%s`.', out.join( ' -> ' ) ) );
9494
}
9595

9696

lib/node_modules/@stdlib/ndarray/base/ind/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function ind( idx, max, mode ) {
7474
return wrapIndex( idx, max );
7575
}
7676
if ( idx < 0 || idx > max ) {
77-
throw new RangeError( format( 'invalid argument. Index must be on the interval: [0,%f]. Value: `%f`.', max, idx ) );
77+
throw new RangeError( format( 'invalid argument. Index must be on the interval: [0, %f]. Value: `%f`.', max, idx ) );
7878
}
7979
return idx;
8080
}

lib/node_modules/@stdlib/ndarray/ctor/lib/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function get() {
5050
var i;
5151

5252
if ( arguments.length !== this._ndims ) {
53-
throw new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: %u. nargs: %u.', this._ndims, arguments.length ) );
53+
throw new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );
5454
}
5555
idx = this._offset;
5656
M = this._submode.length;

lib/node_modules/@stdlib/ndarray/ctor/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function ndarray( dtype, buffer, shape, strides, offset, order, options ) {
126126
}
127127
ndims = shape.length;
128128
if ( ndims > MAX_DIMS ) {
129-
throw new RangeError( format( 'invalid argument. Number of dimensions must not exceed `%u` due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );
129+
throw new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );
130130
}
131131
if ( !isIntegerArray( strides ) ) {
132132
throw new TypeError( format( 'invalid argument. `strides` argument must be an array-like object containing integers. Value: `%s`.', strides ) );

lib/node_modules/@stdlib/ndarray/ctor/lib/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function set() {
5555
throw new Error( 'invalid invocation. Cannot write to a read-only array.' );
5656
}
5757
if ( arguments.length !== this._ndims+1 ) {
58-
throw new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: %u. nargs: %u.', this._ndims, arguments.length ) );
58+
throw new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );
5959
}
6060
idx = this._offset;
6161
M = this._submode.length;

lib/node_modules/@stdlib/number/float32/base/from-binary-string/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function fromBinaryStringf( bstr ) {
6969
var exp;
7070

7171
if ( bstr.length !== 32 ) {
72-
throw new Error( format( 'invalid argument. Input string must have a length equal to `%u`. Value: `%s`.', 32, bstr ) );
72+
throw new Error( format( 'invalid argument. Input string must have a length equal to %u. Value: `%s`.', 32, bstr ) );
7373
}
7474
// Sign bit:
7575
sign = ( bstr[0] === '1' ) ? -1.0 : 1.0;

lib/node_modules/@stdlib/number/float64/base/from-binary-string/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function fromBinaryString( bstr ) {
9393
var exp;
9494

9595
if ( bstr.length !== 64 ) {
96-
throw new Error( format( 'invalid argument. Input string must have a length equal to `%u`. Value: `%s`.', 64, bstr ) );
96+
throw new Error( format( 'invalid argument. Input string must have a length equal to %u. Value: `%s`.', 64, bstr ) );
9797
}
9898
// Sign bit:
9999
sign = ( bstr[0] === '1' ) ? -1.0 : 1.0;

lib/node_modules/@stdlib/number/uint16/base/from-binary-string/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function fromBinaryStringUint16( bstr ) {
6262
var sum;
6363
var i;
6464
if ( bstr.length !== NBITS ) {
65-
throw new Error( format( 'invalid argument. Input string must have a length equal to `%u`. Value: `%u`.', NBITS, bstr ) );
65+
throw new Error( format( 'invalid argument. Input string must have a length equal to %u. Value: `%s`.', NBITS, bstr ) );
6666
}
6767
sum = 0;
6868
for ( i = 0; i < bstr.length; i++ ) {

lib/node_modules/@stdlib/number/uint32/base/from-binary-string/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function fromBinaryStringUint32( bstr ) {
6363
var sum;
6464
var i;
6565
if ( bstr.length !== NBITS ) {
66-
throw new Error( format( 'invalid argument. Input string must have a length equal to `%u`. Value: `%s`.', NBITS, bstr ) );
66+
throw new Error( format( 'invalid argument. Input string must have a length equal to %u. Value: `%s`.', NBITS, bstr ) );
6767
}
6868
sum = 0;
6969
for ( i = 0; i < bstr.length; i++ ) {

0 commit comments

Comments
 (0)