Skip to content

Commit 7cf95cd

Browse files
committed
Update error messages
1 parent c55cf6e commit 7cf95cd

209 files changed

Lines changed: 255 additions & 251 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/node_modules/@stdlib/_tools/github/org-repos/lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function validate( opts, options ) {
4545
}
4646
opts.org = options.org;
4747
if ( !isString( opts.org ) ) {
48-
return new TypeError( format( 'invalid option. `org` organization name option must be a string. Option: `%s`.', opts.org ) );
48+
return new TypeError( format( 'invalid option. `%s` organization name option must be a string. Option: `%s`.', 'org', opts.org ) );
4949
}
5050
if ( hasOwnProp( options, 'type' ) ) {
5151
opts.type = options.type;

lib/node_modules/@stdlib/_tools/github/workflow-runs/lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function validate( opts, options ) {
106106
!contains( STATUS_VALUES, opts.status ) &&
107107
!contains( CONCLUSION_VALUES, opts.status )
108108
) {
109-
return new TypeError( format( 'invalid option. `%s` option must be a either one of %s or %s. Option: `%s`.', 'status', STATUS_VALUES.join( ', ' ), CONCLUSION_VALUES.join( ', '), opts.status ) );
109+
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s" or "%". Option: `%s`.', 'status', STATUS_VALUES.join( '", "' ), CONCLUSION_VALUES.join( '", "'), opts.status ) );
110110
}
111111
}
112112
return null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function validate( opts, options ) {
6969
return new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );
7070
}
7171
if ( opts.submode.length === 0 ) {
72-
return new TypeError( format( 'invalid option. `submode` option must be an array containing recognized modes. Option: `%s`.', opts.submode.join( ',' ) ) );
72+
return new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );
7373
}
7474
for ( i = 0; i < opts.submode.length; i++ ) {
7575
if ( !isIndexMode( opts.submode[ i ] ) ) {

lib/node_modules/@stdlib/plot/base/ctor/lib/props/auto-render/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var debug = logger( 'plot:base:set:auto-render' );
4242
function set( bool ) {
4343
/* eslint-disable no-invalid-this */
4444
if ( !isBoolean( bool ) ) {
45-
throw new TypeError( format( 'invalid value. `%s` must be a boolean. Value: `%s`.', 'autoRender', bool ) );
45+
throw new TypeError( format( 'invalid assignment. `%s` must be a boolean. Value: `%s`.', 'autoRender', bool ) );
4646
}
4747
if ( bool !== this._autoRender ) {
4848
debug( 'Current value: %s.', this._autoRender );

lib/node_modules/@stdlib/plot/base/ctor/lib/props/auto-view/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var debug = logger( 'plot:base:set:auto-view' );
4242
function set( bool ) {
4343
/* eslint-disable no-invalid-this */
4444
if ( !isBoolean( bool ) ) {
45-
throw new TypeError( format( 'invalid value. `%s` must be a boolean. Value: `%s`.', 'autoView', bool ) );
45+
throw new TypeError( format( 'invalid assignment. `%s` must be a boolean. Value: `%s`.', 'autoView', bool ) );
4646
}
4747
if ( bool !== this._autoView ) {
4848
debug( 'Current value: %s.', this._autoView );

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var debug = logger( 'plot:base:set:description' );
4242
function set( str ) {
4343
/* eslint-disable no-invalid-this */
4444
if ( !isString( str ) ) {
45-
throw new TypeError( format( 'invalid value. `%s` must be a string. Value: `%s`.', 'description', str ) );
45+
throw new TypeError( format( 'invalid assignment. `%s` must be a string. Value: `%s`.', 'description', str ) );
4646
}
4747
if ( str !== this._description ) {
4848
debug( 'Current value: %s.', this._description );

lib/node_modules/@stdlib/plot/base/ctor/lib/props/engine/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:engine' );
4343
function set( engine ) {
4444
/* eslint-disable no-invalid-this */
4545
if ( !contains( ENGINES, engine ) ) {
46-
throw new TypeError( format( 'invalid value. `%s` must be one of the following: "%s". Value: `%s`.', 'engine', ENGINES.join( '", "' ), engine ) );
46+
throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', 'engine', ENGINES.join( '", "' ), engine ) );
4747
}
4848
if ( engine !== this._engine ) {
4949
debug( 'Current value: %s.', this._engine );

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var debug = logger( 'plot:base:set:height' );
4242
function set( height ) {
4343
/* eslint-disable no-invalid-this */
4444
if ( !isPositiveNumber( height ) ) {
45-
throw new TypeError( format( 'invalid value. `%s` must be a positive number. Value: `%s`.', 'height', height ) );
45+
throw new TypeError( format( 'invalid assignment. `%s` must be a positive number. Value: `%s`.', 'height', height ) );
4646
}
4747
if ( height !== this._height ) {
4848
debug( 'Current value: %d.', this._height );

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 value. `%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 either 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/base/ctor/lib/props/line-opacity/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function set( v ) {
4646
var isNum = isNumber( v );
4747
var i;
4848
if ( !isNum && !isNumberArray( v ) ) {
49-
throw new TypeError( format( 'invalid value. `%s` must be a number or number array. Value: `%s`.', 'lineOpacity', v ) );
49+
throw new TypeError( format( 'invalid assignment. `%s` must be a number or number array. Value: `%s`.', 'lineOpacity', v ) );
5050
}
5151
if ( isNum ) {
5252
v = [ v ];

0 commit comments

Comments
 (0)