Skip to content

Commit e33f3e9

Browse files
committed
Update error messages
1 parent 5f329a1 commit e33f3e9

File tree

23 files changed

+27
-27
lines changed

23 files changed

+27
-27
lines changed

lib/node_modules/@stdlib/bench/harness/lib/harness/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function validate( opts, options ) {
7272
!isPositiveInteger( opts.iterations ) &&
7373
!isNull( opts.iterations )
7474
) {
75-
return new TypeError( format( 'invalid option. `%s` option must be either a positive integer or `null`. Option: `%s`.', 'iterations', opts.iterations ) );
75+
return new TypeError( format( 'invalid option. `%s` option must be either a positive integer or null. Option: `%s`.', 'iterations', opts.iterations ) );
7676
}
7777
}
7878
if ( hasOwnProp( options, 'repeats' ) ) {

lib/node_modules/@stdlib/blas/sdot/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function sdot( x, y ) {
5252
throw new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', x ) );
5353
}
5454
if ( !isFloat32VectorLike( y ) ) {
55-
throw new TypeError( format( 'invalid argument. Second argument must be a 1-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', y ) );
55+
throw new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', y ) );
5656
}
5757
if ( x.length !== y.length ) {
5858
throw new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );

lib/node_modules/@stdlib/blas/sswap/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function sswap( x, y ) {
5757
throw new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', x ) );
5858
}
5959
if ( !isFloat32VectorLike( y ) ) {
60-
throw new TypeError( format( 'invalid argument. Second argument must be a 1-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', y ) );
60+
throw new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', y ) );
6161
}
6262
if ( x.length !== y.length ) {
6363
throw new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );

lib/node_modules/@stdlib/ml/incr/kmeans/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ function incrkmeans() {
367367
var i;
368368
if ( arguments.length > 1 ) {
369369
if ( !isVectorLike( out ) ) {
370-
throw new TypeError( format( 'invalid argument. Output argument must be a 1-dimensional ndarray. Value: `%s`.', out ) );
370+
throw new TypeError( format( 'invalid argument. Output argument must be a one-dimensional ndarray. Value: `%s`.', out ) );
371371
}
372372
o = out;
373373
x = X;

lib/node_modules/@stdlib/plot/base/ctor/lib/props/labels/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var debug = logger( 'plot:base:set:labels' );
4343
function set( labels ) {
4444
/* eslint-disable no-invalid-this */
4545
if ( !isEmptyArray( labels ) && !isStringArray( labels ) ) {
46-
throw new TypeError( format( 'invalid assignment. `%s` must be either an array of strings or an empty array. Value: `%s`.', 'labels', labels ) );
46+
throw new TypeError( format( 'invalid assignment. `%s` must be an array of strings or an empty array. Value: `%s`.', 'labels', labels ) );
4747
}
4848
debug( 'Current value: %s.', JSON.stringify( this._labels ) );
4949

lib/node_modules/@stdlib/plot/components/svg/path/lib/props/opacity/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function set( opacity ) {
4949
opacity < 0.0 ||
5050
opacity > 1.0
5151
) {
52-
throw new RangeError( format( 'invalid assignment. `%s` must be a number on the interval `[0,1]`. Value: `%f`.', 'opacity', opacity ) );
52+
throw new RangeError( format( 'invalid assignment. `%s` must be a number on the interval: [0, 1]. Value: `%f`.', 'opacity', opacity ) );
5353
}
5454
debug( 'Current value: %d.', this._opacity );
5555

lib/node_modules/@stdlib/plot/components/svg/rug/lib/props/opacity/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function set( opacity ) {
4848
throw new TypeError( format( 'invalid assignment. `%s` must be a number or a function. Value: `%s`.', 'opacity', opacity ) );
4949
}
5050
if ( isNum && (opacity !== opacity || opacity < 0.0 || opacity > 1.0) ) {
51-
throw new RangeError( format( 'invalid assignment. `%s` must be a number on the interval `[0,1]`. Value: `%f`.', 'opacity', opacity ) );
51+
throw new RangeError( format( 'invalid assignment. `%s` must be a number on the interval: [0, 1]. Value: `%f`.', 'opacity', opacity ) );
5252
}
5353
if ( opacity !== this._opacity ) {
5454
debug( 'Current value: %d.', this._opacity );

lib/node_modules/@stdlib/plot/components/svg/rug/lib/props/orientation/set.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ var debug = logger( 'rug:set:orientation' );
3838
*
3939
* @private
4040
* @param {string} orient - orientation
41-
* @throws {Error} must be a supported orientation
41+
* @throws {TypeError} must be a supported orientation
4242
*/
4343
function set( orient ) {
4444
/* eslint-disable no-invalid-this */
4545
if ( indexOf( ORIENTATIONS, orient ) === -1 ) {
46-
throw new Error( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', 'orientation', ORIENTATIONS.join( '", "' ), orient ) );
46+
throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', 'orientation', ORIENTATIONS.join( '", "' ), orient ) );
4747
}
4848
if ( orient !== this._orientation ) {
4949
debug( 'Current value: %d.', this._orientation );

lib/node_modules/@stdlib/plot/components/svg/symbols/lib/props/opacity/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function set( opacity ) {
5454
isNum &&
5555
(opacity < 0.0 || opacity > 1.0)
5656
) {
57-
throw new RangeError( format( 'invalid assignment. `%s` must be a number on the interval `[0,1]`. Value: `%f`.', 'opacity', opacity ) );
57+
throw new RangeError( format( 'invalid assignment. `%s` must be a number on the interval: [0, 1]. Value: `%f`.', 'opacity', opacity ) );
5858
}
5959
debug( 'Current value: %d.', this._opacity );
6060

lib/node_modules/@stdlib/plot/ctor/lib/props/colors/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function set( v ) {
4646
/* eslint-disable no-invalid-this */
4747
var isStr = isString( v );
4848
if ( !isStr && !isStringArray( v ) ) {
49-
throw new TypeError( format( 'invalid assignment. `%s` must be either a string or a string array. Value: `%s`.', 'colors', v ) );
49+
throw new TypeError( format( 'invalid assignment. `%s` must be a string or an array of strings. Value: `%s`.', 'colors', v ) );
5050
}
5151
if ( isStr ) {
5252
if ( COLORS[ v ] === void 0 ) {

0 commit comments

Comments
 (0)