Skip to content

Commit d3c7893

Browse files
committed
Update error messages
1 parent 66b63ee commit d3c7893

File tree

43 files changed

+60
-58
lines changed

Some content is hidden

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

43 files changed

+60
-58
lines changed

lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/runner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,12 @@ function factory( options ) {
265265
// Ensure that we don't return an error when the code block intentionally threw an exception...
266266
if ( !conf.throws ) {
267267
// TODO: the generated error is a bit messy. Cleaning-up may require manual modification of the stacktrace(s), etc.
268-
error = new Error( format( 'unexpected error. Encountered an error when executing code block. File: %s. Message: %s', file.path || '(undefined)', error.message ) );
268+
error = new Error( format( 'unexpected error. Encountered an error when executing code block. File: `%s`. Message: `%s`.', file.path || '(undefined)', error.message ) );
269269
return done( error );
270270
}
271271
} else if ( conf.throws ) {
272272
debug( 'Code block failed to throw an exception.' );
273-
error = new Error( format( 'unexpected error. Expected code block to throw an exception. File: %s.', file.path || '(undefined)' ) );
273+
error = new Error( format( 'unexpected error. Expected code block to throw an exception. File: `%s`.', file.path || '(undefined)' ) );
274274
return done( error );
275275
}
276276
if ( !options.quiet && !options.silent ) {

lib/node_modules/@stdlib/assert/contains/lib/contains.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function contains( val, searchValue, position ) {
7777
throw new TypeError( format( 'invalid argument. First argument must be array-like. Value: `%s`.', val ) );
7878
}
7979
if ( arguments.length < 2 ) {
80-
throw new Error( 'insufficient input arguments. Must provide a search value.' );
80+
throw new Error( 'insufficient arguments. Must provide a search value.' );
8181
}
8282
if ( arguments.length > 2 ) {
8383
if ( !isInteger( position ) ) {

lib/node_modules/@stdlib/assert/instance-of/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var format = require( '@stdlib/string/format' );
5656
function instanceOf( value, constructor ) {
5757
// TODO: replace with `isCallable` check
5858
if ( typeof constructor !== 'function' ) {
59-
throw new TypeError( format( 'invalid argument. `constructor` argument must be callable. Value: `%s`.', constructor ) );
59+
throw new TypeError( format( 'invalid argument. Second argument must be callable. Value: `%s`.', constructor ) );
6060
}
6161
return ( value instanceof constructor );
6262
}

lib/node_modules/@stdlib/error/tools/database/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function replacer( match, p1 ) {
3030
return 'Error( formatProdErrorMessage( \'' + errorMap[ p1 ] + '\' ) )';
3131
}
3232

33-
var code = 'throw new Error( \'insufficient input arguments. Must provide at least one iterator function.\' );';
33+
var code = 'throw new Error( \'insufficient arguments. Must provide at least one iterator function.\' );';
3434
var transformed = replace( code, RE_ERR_MSG, replacer );
3535
console.log( transformed );
3636
// => 'throw new Error( formatProdErrorMessage( \'04\' ) );'

lib/node_modules/@stdlib/iter/concat/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function iterConcat() {
7272

7373
niter = arguments.length;
7474
if ( niter < 2 ) {
75-
throw new Error( 'insufficient input arguments. Must provide two or more iterators.' );
75+
throw new Error( 'insufficient arguments. Must provide two or more iterators.' );
7676
}
7777
iterators = [];
7878
for ( i = 0; i < niter; i++ ) {

lib/node_modules/@stdlib/iter/fill/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function iterFill( iterator, value, begin, end ) {
8888
M = END;
8989
}
9090
} else if ( arguments.length < 2 ) {
91-
throw new Error( 'insufficient input arguments. Must provide both an iterator and a static value.' );
91+
throw new Error( 'insufficient arguments. Must provide both an iterator and a static value.' );
9292
} else {
9393
N = BEGIN;
9494
M = END;

lib/node_modules/@stdlib/iter/intersection-by-hash/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ function iterIntersectionByHash() {
192192
}
193193
niter = iterators.length;
194194
if ( niter < 2 ) {
195-
throw new Error( 'insufficient input arguments. Must provide two or more iterators.' );
195+
throw new Error( 'insufficient arguments. Must provide two or more iterators.' );
196196
}
197197
if ( niter === arguments.length ) {
198-
throw new Error( 'insufficient input arguments. Must provide a hash function.' );
198+
throw new Error( 'insufficient arguments. Must provide a hash function.' );
199199
}
200200
if ( arguments.length > niter+2 ) {
201201
// Addresses the case: fcn( it, it, null, it, it, hashFcn )

lib/node_modules/@stdlib/iter/intersection/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function iterIntersection() {
169169

170170
niter = arguments.length;
171171
if ( niter < 2 ) {
172-
throw new Error( 'insufficient input arguments. Must provide two or more iterators.' );
172+
throw new Error( 'insufficient arguments. Must provide two or more iterators.' );
173173
}
174174
iterators = [];
175175
for ( i = 0; i < niter; i++ ) {

lib/node_modules/@stdlib/iter/mapn/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function iterMapN() {
8383
throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) );
8484
}
8585
if ( niter < 2 ) {
86-
throw new Error( 'insufficient input arguments. Must provide two or more iterators.' );
86+
throw new Error( 'insufficient arguments. Must provide two or more iterators.' );
8787
}
8888
iterators = [];
8989
for ( i = 0; i < niter; i++ ) {

lib/node_modules/@stdlib/iter/pipeline/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function iterPipeline() {
7171
}
7272
}
7373
if ( nFuncs === 0 ) {
74-
throw new Error( 'insufficient input arguments. Must provide at least one iterator function.' );
74+
throw new Error( 'insufficient arguments. Must provide at least one iterator function.' );
7575
}
7676
for ( i = 0; i < nFuncs; i++ ) {
7777
if ( !isFunction( f[ i ] ) ) {

0 commit comments

Comments
 (0)