Skip to content

Commit b95e8df

Browse files
committed
Update error messages
1 parent 865249b commit b95e8df

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

lib/node_modules/@stdlib/array/complex128/lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function Complex128Array() {
236236
if ( buf === null ) {
237237
// We failed and we are now forced to allocate a new array :-(
238238
if ( !isEven( len ) ) {
239-
throw new RangeError( format( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
239+
throw new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
240240
}
241241
// We failed, so fall back to directly setting values...
242242
buf = new Float64Array( arguments[0] );
@@ -247,7 +247,7 @@ function Complex128Array() {
247247
} else if ( isComplex128Array( buf ) ) {
248248
buf = reinterpret128( buf, 0 );
249249
} else if ( !isEven( len ) ) {
250-
throw new RangeError( format( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
250+
throw new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
251251
}
252252
buf = new Float64Array( buf );
253253
}

lib/node_modules/@stdlib/array/complex64/lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function Complex64Array() {
236236
if ( buf === null ) {
237237
// We failed and we are now forced to allocate a new array :-(
238238
if ( !isEven( len ) ) {
239-
throw new RangeError( format( 'invalid argument. Array-like object input arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
239+
throw new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
240240
}
241241
// We failed, so fall back to directly setting values...
242242
buf = new Float32Array( arguments[0] );
@@ -247,7 +247,7 @@ function Complex64Array() {
247247
} else if ( isComplex128Array( buf ) ) {
248248
buf = reinterpret128( buf, 0 );
249249
} else if ( !isEven( len ) ) {
250-
throw new RangeError( format( 'invalid argument. Array-like object and typed array input arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
250+
throw new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );
251251
}
252252
buf = new Float32Array( buf );
253253
}

lib/node_modules/@stdlib/fs/resolve-parent-path-by/lib/async.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function resolveParentPathBy( path, options, predicate, clbk ) {
8383
done = predicate;
8484
}
8585
if ( !isFunction( test ) ) {
86-
throw new TypeError( format( 'invalid argument. Predicate function argument must be a function. Value: `%s`.', test ) );
86+
throw new TypeError( format( 'invalid argument. Predicate function must be a function. Value: `%s`.', test ) );
8787
}
8888
if ( !isFunction( done ) ) {
8989
throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', done ) );

lib/node_modules/@stdlib/ml/incr/sgd-regression/lib/weight_vector.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ function WeightVector( dim, intercept ) {
136136
return new WeightVector( dim, intercept );
137137
}
138138
if ( !isPositiveInteger( dim ) ) {
139-
throw new TypeError( format( 'invalid argument. First argument `dim` must be a positive integer. Value: `%s`.', dim ) );
139+
throw new TypeError( format( 'invalid argument. First argument must be a positive integer. Value: `%s`.', dim ) );
140140
}
141141
if ( !isBoolean( intercept ) ) {
142-
throw new TypeError( format( 'invalid argument. Second argument `intercept` must be a boolean. Value: `%s`.', intercept ) );
142+
throw new TypeError( format( 'invalid argument. Second argument must be a boolean. Value: `%s`.', intercept ) );
143143
}
144144

145145
this.scale = 1.0;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var format = require( '@stdlib/string/format' );
3737
* @throws {TypeError} first argument must be an array-like object
3838
* @throws {TypeError} second argument must be a nonnegative integer
3939
* @throws {TypeError} third argument must be a nonnegative integer
40-
* @throws {RangeError} first argument must have at least one element
40+
* @throws {RangeError} first argument must contain at least one element
4141
* @throws {RangeError} length of the first argument is incompatible with the second and third arguments
4242
* @returns {StringArray} list of signatures
4343
*

lib/node_modules/@stdlib/stats/anova1/lib/anova1.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var prettyPrint = require( './print.js' );
4949
* @throws {TypeError} must provide valid options
5050
* @throws {TypeError} `x` must be a numeric array
5151
* @throws {TypeError} `factor` must be an array
52-
* @throws {RangeError} `factor` must have at least two unique elements
52+
* @throws {RangeError} `factor` must contain at least two unique elements
5353
* @throws {RangeError} length of `x` must be greater than or equal to two
5454
* @throws {RangeError} `x` and `factor` must have the same length
5555
* @returns {Object} test results
@@ -88,7 +88,7 @@ function anova1( x, factor, options ) {
8888
}
8989
nobs = x.length;
9090
if ( nobs <= 1 ) {
91-
throw new RangeError( format( 'invalid argument. First argument must have at least two elements. Value: `%s`.', x ) );
91+
throw new RangeError( format( 'invalid argument. First argument must contain at least two elements. Value: `%s`.', x ) );
9292
}
9393
if ( !isArray( factor ) ) {
9494
throw new TypeError( format( 'invalid argument. Second argument must be an array. Value: `%s`.', treats ) );

lib/node_modules/@stdlib/stats/base/dists/f/ctor/lib/ctor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ function F() {
109109
d1 = arguments[ 0 ];
110110
d2 = arguments[ 1 ];
111111
if ( !isPositive( d1 ) ) {
112-
throw new TypeError( format( 'invalid argument. Numerator degrees of freedom `d1` must be a positive number. Value: `%s`.', d1 ) );
112+
throw new TypeError( format( 'invalid argument. Numerator degrees of freedom must be a positive number. Value: `%s`.', d1 ) );
113113
}
114114
if ( !isPositive( d2 ) ) {
115-
throw new TypeError( format( 'invalid argument. Denominator degrees of freedom `d2` must be a positive number. Value: `%s`.', d2 ) );
115+
throw new TypeError( format( 'invalid argument. Denominator degrees of freedom must be a positive number. Value: `%s`.', d2 ) );
116116
}
117117
} else {
118118
d1 = 1.0;

lib/node_modules/@stdlib/stats/padjust/lib/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function padjust( pvals, method, comparisons ) {
8787
throw new TypeError( format( 'invalid argument. `comparisons` must be an integer. Value: `%s`.', comparisons ) );
8888
}
8989
if ( comparisons < pvals.length ) {
90-
throw new RangeError( format( 'invalid argument. When specified, `%s` arguments must have at least a length of %u. Value: `%u`.', 'comparisons', pvals.length, comparisons ) );
90+
throw new RangeError( format( 'invalid argument. When specified, `%s` arguments must contain at least a length of %u. Value: `%u`.', 'comparisons', pvals.length, comparisons ) );
9191
}
9292
}
9393
comparisons = comparisons || pvals.length;

lib/node_modules/@stdlib/stats/ttest/lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var print = require( './print.js' ); // eslint-disable-line stdlib/no-redeclare
5151
* @param {string} [options.alternative='two-sided'] - alternative hypothesis (`two-sided`, `less`, or `greater`)
5252
* @param {number} [options.mu=0.0] - mean under `H0`
5353
* @throws {TypeError} first argument must be a numeric array
54-
* @throws {Error} first argument must have at least two elements
54+
* @throws {Error} first argument must contain at least two elements
5555
* @throws {Error} paired array must have the same length as the first argument
5656
* @throws {TypeError} second argument must be either a numeric array or an options object
5757
* @throws {TypeError} `alpha` option must be number
@@ -96,7 +96,7 @@ function ttest( x ) {
9696
}
9797
len = x.length;
9898
if ( len < 2 ) {
99-
throw new Error( format( 'invalid argument. First argument must have at least two elements. Value: `%s`.', x ) );
99+
throw new Error( format( 'invalid argument. First argument must contain at least two elements. Value: `%s`.', x ) );
100100
}
101101
opts = {
102102
'mu': 0.0,

lib/node_modules/@stdlib/utils/compact-adjacency-matrix/lib/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ setReadOnly( CompactAdjacencyMatrix, 'fromEdges', function fromEdges( N, edges )
292292
if ( isObject( edges ) && HAS_ITERATOR_SYMBOL && isFunction( edges[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len
293293
tmp = edges[ ITERATOR_SYMBOL ]();
294294
if ( !isFunction( tmp.next ) ) {
295-
throw new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`', edges ) );
295+
throw new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', edges ) );
296296
}
297297
if ( clbk ) {
298298
tmp = fromIteratorEdgesMap( tmp, clbk, thisArg );

0 commit comments

Comments
 (0)