Skip to content

Commit 345740e

Browse files
committed
Update error message
1 parent e0675c0 commit 345740e

File tree

22 files changed

+40
-39
lines changed

22 files changed

+40
-39
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-require-throws-tags/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function incrspace( x1, x2 ) {
7171
inc = 1;
7272
len = ceil( ( x2-x1 ) / inc );
7373
if ( len > MAX_LENGTH ) {
74-
throw new RangeError( 'invalid input arguments. Generated array exceeds maximum array length.' );
74+
throw new RangeError( 'invalid arguments. Generated array exceeds maximum array length.' );
7575
}
7676
if ( len <= 1 ) {
7777
return [ x1 ];
@@ -117,7 +117,7 @@ function incrspace( x1, x2 ) {
117117
inc = 1;
118118
len = ceil( ( x2-x1 ) / inc );
119119
if ( len > MAX_LENGTH ) {
120-
throw new RangeError( 'invalid input arguments. Generated array exceeds maximum array length.' );
120+
throw new RangeError( 'invalid arguments. Generated array exceeds maximum array length.' );
121121
}
122122
if ( len <= 1 ) {
123123
return [ x1 ];

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-require-throws-tags/test/fixtures/invalid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ test = {
205205
' inc = 1;',
206206
' len = ceil( ( x2-x1 ) / inc );',
207207
' if ( len > MAX_LENGTH ) {',
208-
' throw new RangeError( \'invalid input arguments. Generated array exceeds maximum array length.\' );',
208+
' throw new RangeError( \'invalid arguments. Generated array exceeds maximum array length.\' );',
209209
' }',
210210
' if ( len <= 1 ) {',
211211
' return [ x1 ];',

lib/node_modules/@stdlib/math/utils/incrspace/lib/incrspace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function incrspace( x1, x2, increment ) {
6666
len = ceil( ( x2-x1 ) / inc );
6767

6868
if ( len > MAX_LENGTH ) {
69-
throw new RangeError( 'invalid input arguments. Generated array exceeds maximum array length.' );
69+
throw new RangeError( 'invalid arguments. Generated array exceeds maximum array length.' );
7070
}
7171
if ( len <= 1 ) {
7272
return [ x1 ];

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function array() {
282282
shape = [ len ]; // assume a 1-dimensional array (vector)
283283
}
284284
} else {
285-
throw new Error( 'invalid input arguments. Must provide either a data source, array shape, or both.' );
285+
throw new Error( 'invalid arguments. Must provide either a data source, array shape, or both.' );
286286
}
287287
// Adjust the array shape to satisfy the minimum number of dimensions...
288288
if ( ndims < opts.ndmin ) {
@@ -292,7 +292,7 @@ function array() {
292292
// If not provided a data buffer, create it; otherwise, see if we need to cast a provided data buffer to another data type or perform a copy...
293293
if ( FLG ) {
294294
if ( buffer.length !== len ) {
295-
throw new RangeError( 'invalid input arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );
295+
throw new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );
296296
}
297297
if ( btype !== dtype || opts.copy ) {
298298
buffer = copyView( buffer, dtype );
@@ -310,7 +310,7 @@ function array() {
310310
buffer = flattenArray( buffer );
311311
}
312312
if ( buffer.length !== len ) {
313-
throw new RangeError( 'invalid input arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );
313+
throw new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );
314314
}
315315
if ( btype !== dtype || opts.copy ) {
316316
buffer = castBuffer( buffer, len, dtype );

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ var MAX_DIMS = 32767|0;
7272
* @throws {TypeError} second argument must be a number having a positive integer value
7373
* @throws {TypeError} options argument must be an object
7474
* @throws {TypeError} must provide valid options
75+
* @throws {RangeError} too many dimensions
7576
* @returns {Function} ndarray constructor
7677
*
7778
* @example
@@ -167,7 +168,7 @@ function ctor( dtype, ndims, options ) {
167168
throw new TypeError( 'invalid input argument. `order` argument must be a supported order. Value: `' + order + '`.' );
168169
}
169170
if ( !isBufferLengthCompatible( buffer.length, shape, strides, offset ) ) { // eslint-disable-line max-len
170-
throw new Error( 'invalid input arguments. The input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the stride array and that the buffer has enough elements to satisfy the desired array shape.' );
171+
throw new Error( 'invalid arguments. The input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the stride array and that the buffer has enough elements to satisfy the desired array shape.' );
171172
}
172173
// Copy `shape` and `strides` to prevent external mutation:
173174
sh = copy( shape, ndims );

lib/node_modules/@stdlib/plot/components/svg/path/lib/render/utils/zip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function zip( x, y ) {
3131
var out;
3232
var i;
3333
if ( x.length !== y.length ) {
34-
throw new Error( 'invalid input arguments. Must provide equal length array-like objects. `x` length: '+x.length+', `y` length: '+y.length+'.' );
34+
throw new Error( 'invalid arguments. Must provide equal length array-like objects. `x` length: '+x.length+', `y` length: '+y.length+'.' );
3535
}
3636
out = new Array( x.length );
3737
for ( i = 0; i < x.length; i++ ) {

lib/node_modules/@stdlib/random/base/triangular/lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function validate( a, b, c ) {
5252
return new TypeError( 'invalid input argument. Third argument must be a number primitive and not `NaN`. Value: `'+c+'`.' );
5353
}
5454
if ( !(a <= c && c <= b) ) {
55-
return new RangeError( 'invalid input arguments. The condition `a <= c <= b` must be satisfied. Value: `['+a+','+b+','+c+']`.');
55+
return new RangeError( 'invalid arguments. The condition `a <= c <= b` must be satisfied. Value: `['+a+','+b+','+c+']`.');
5656
}
5757
return null;
5858
}

lib/node_modules/@stdlib/random/iterators/triangular/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function iterator( a, b, c, options ) {
7979
throw new TypeError( 'invalid input argument. Third argument must be a number primitive and not `NaN`. Value: `'+c+'`.' );
8080
}
8181
if ( !(a <= c && c <= b) ) {
82-
throw new RangeError( 'invalid input arguments. The condition `a <= c <= b` must be satisfied. Value: `['+a+','+b+','+c+']`.');
82+
throw new RangeError( 'invalid arguments. The condition `a <= c <= b` must be satisfied. Value: `['+a+','+b+','+c+']`.');
8383
}
8484
niter = MAX_VALUE;
8585
if ( arguments.length > 3 ) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function anova1( x, factor, options ) {
9999
throw new RangeError( 'invalid input argument. Second argument must contain at least two unique elements. Value: `' + treats + '`.' );
100100
}
101101
if ( nobs !== factor.length ) {
102-
throw new RangeError( 'invalid input arguments. Arguments `x` and `factor` must be arrays of the same length.' );
102+
throw new RangeError( 'invalid arguments. Arguments `x` and `factor` must be arrays of the same length.' );
103103
}
104104

105105
sumSqTotal = 0.0;

lib/node_modules/@stdlib/stats/base/dists/arcsine/ctor/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function Arcsine() {
139139
throw new TypeError( 'invalid input argument. Maximum support `b` must be a number primitive. Value: `' + b + '`' );
140140
}
141141
if ( a >= b ) {
142-
throw new RangeError( 'invalid input arguments. Minimum support `a` must be less than maximum support `b`. Value: `' + a + ',' + b + '`' );
142+
throw new RangeError( 'invalid arguments. Minimum support `a` must be less than maximum support `b`. Value: `' + a + ',' + b + '`' );
143143
}
144144
} else {
145145
a = 0.0;
@@ -151,7 +151,7 @@ function Arcsine() {
151151
'get': function get() {
152152
return a;
153153
},
154-
'set': function set( value ) {
154+
'set': function set( value ) { // eslint-disable-line stdlib/jsdoc-require-throws-tags
155155
if ( !isNumber( value ) || isnan( value ) ) {
156156
throw new TypeError( 'invalid value. Must be a number primitive. Value: `' + value + '`' );
157157
}

0 commit comments

Comments
 (0)