Skip to content

Commit dc5cc1f

Browse files
committed
Update error messages
1 parent 8b7ba15 commit dc5cc1f

File tree

19 files changed

+31
-30
lines changed

19 files changed

+31
-30
lines changed

lib/node_modules/@stdlib/math/iter/sequences/negafibonacci/lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function validate( opts, options ) {
5757
return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'iter', options.iter ) );
5858
}
5959
if ( options.iter > 79 ) {
60-
return new RangeError( format( 'invalid option. `%s` option must be less than or equal to `79`. Option: `%u`.', 'iter', options.iter ) );
60+
return new RangeError( format( 'invalid option. `%s` option must be less than or equal to 79. Option: `%u`.', 'iter', options.iter ) );
6161
}
6262
}
6363
return null;

lib/node_modules/@stdlib/math/iter/sequences/negalucas/lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function validate( opts, options ) {
5757
return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'iter', options.iter ) );
5858
}
5959
if ( options.iter > 77 ) {
60-
return new RangeError( format( 'invalid option. `%s` option must be less than or equal to `77`. Option: `%u`.', 'iter', options.iter ) );
60+
return new RangeError( format( 'invalid option. `%s` option must be less than or equal to 77. Option: `%u`.', 'iter', options.iter ) );
6161
}
6262
}
6363
return null;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ function dispatch( fcns, types, data, nargs, nin, nout ) {
164164
v = arguments[ i ];
165165
if ( !isndarrayLike( v ) ) {
166166
if ( i < nin ) {
167-
throw new TypeError( 'invalid argument. Input array argument must be an ndarray-like object.' );
167+
throw new TypeError( format( 'invalid argument. Input array must be an ndarray-like object. Value: `%s`.', v ) );
168168
} else {
169-
throw new TypeError( 'invalid argument. Output array argument must be an ndarray-like object.' );
169+
throw new TypeError( format( 'invalid argument. Output array must be an ndarray-like object. Value: `%s`.', v ) );
170170
}
171171
}
172172
arrays.push( v );

lib/node_modules/@stdlib/ndarray/ind2sub/lib/assign.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function ind2sub( shape, idx, options, out ) {
9494
throw new TypeError( format( 'invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );
9595
}
9696
if ( !isInteger( idx ) ) {
97-
throw new TypeError( format( 'invalid argument. Linear index argument must be integer valued. Value: `%s`.', idx ) );
97+
throw new TypeError( format( 'invalid argument. Linear index must be integer valued. Value: `%s`.', idx ) );
9898
}
9999
// Note: strides are positive, so offset is always zero
100100
return getSubscripts( shape, shape2strides( shape, opts.order ), 0, opts.order, idx, opts.mode, dest ); // eslint-disable-line max-len

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function ind2sub( shape, idx, options ) {
7676
throw new TypeError( format( 'invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );
7777
}
7878
if ( !isInteger( idx ) ) {
79-
throw new TypeError( format( 'invalid argument. Linear index argument must be integer valued. Value: `%s`.', idx ) );
79+
throw new TypeError( format( 'invalid argument. Linear index must be integer valued. Value: `%s`.', idx ) );
8080
}
8181
// Note: strides are positive, so offset is always zero
8282
return getSubscripts( shape, shape2strides( shape, opts.order ), 0, opts.order, idx, opts.mode ); // eslint-disable-line max-len

lib/node_modules/@stdlib/net/http-server/lib/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function httpServer() {
147147
function createServer( done ) {
148148
var server;
149149
if ( !isFunction( done ) ) {
150-
throw new TypeError( format( 'invalid argument. Callback must be a function. Value: `%s`.', done ) );
150+
throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', done ) );
151151
}
152152
if ( requestListener ) {
153153
server = http.createServer( requestListener );

lib/node_modules/@stdlib/nlp/lda/lib/lda.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function lda( documents, K, options ) {
9595
throw new TypeError( format( 'invalid argument. First argument must be an array of strings. Value: `%s`.', documents ) );
9696
}
9797
if ( !isPositiveInteger( K ) ) {
98-
throw new TypeError( format( 'invalid argument. Number of topics `K` must be a positive integer. Value: `%s`.', K ) );
98+
throw new TypeError( format( 'invalid argument. Number of topics must be a positive integer. Value: `%s`.', K ) );
9999
}
100100
opts = {};
101101
if ( arguments.length > 2 ) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ function Beta() {
146146
alpha = arguments[ 0 ];
147147
beta = arguments[ 1 ];
148148
if ( !isPositive( alpha ) ) {
149-
throw new TypeError( format( 'invalid argument. First shape parameter `alpha` must be a positive number. Value: `%s`.', alpha ) );
149+
throw new TypeError( format( 'invalid argument. First shape parameter must be a positive number. Value: `%s`.', alpha ) );
150150
}
151151
if ( !isPositive( beta ) ) {
152-
throw new TypeError( format( 'invalid argument. Second shape parameter `beta` must be a positive number. Value: `%s`.', beta ) );
152+
throw new TypeError( format( 'invalid argument. Second shape parameter must be a positive number. Value: `%s`.', beta ) );
153153
}
154154
} else {
155155
alpha = 1.0;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ function BetaPrime() {
132132
alpha = arguments[ 0 ];
133133
beta = arguments[ 1 ];
134134
if ( !isPositive( alpha ) ) {
135-
throw new TypeError( format( 'invalid argument. First shape parameter `alpha` must be a positive number. Value: `%s`.', alpha ) );
135+
throw new TypeError( format( 'invalid argument. First shape parameter must be a positive number. Value: `%s`.', alpha ) );
136136
}
137137
if ( !isPositive( beta ) ) {
138-
throw new TypeError( format( 'invalid argument. Second shape parameter `beta` must be a positive number. Value: `%s`.', beta ) );
138+
throw new TypeError( format( 'invalid argument. Second shape parameter must be a positive number. Value: `%s`.', beta ) );
139139
}
140140
} else {
141141
alpha = 1.0;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ function InvGamma() {
121121
alpha = arguments[ 0 ];
122122
beta = arguments[ 1 ];
123123
if ( !isPositive( alpha ) ) {
124-
throw new TypeError( format( 'invalid argument. First shape parameter `alpha` must be a positive number. Value: `%s`.', alpha ) );
124+
throw new TypeError( format( 'invalid argument. First shape parameter must be a positive number. Value: `%s`.', alpha ) );
125125
}
126126
if ( !isPositive( beta ) ) {
127-
throw new TypeError( format( 'invalid argument. Second shape parameter `beta` must be a positive number. Value: `%s`.', beta ) );
127+
throw new TypeError( format( 'invalid argument. Second shape parameter must be a positive number. Value: `%s`.', beta ) );
128128
}
129129
} else {
130130
alpha = 1.0;

0 commit comments

Comments
 (0)