Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Mar 24, 2022
1 parent 9a89e7a commit 658462d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compact-adjacency-matrix/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ setReadOnly( CompactAdjacencyMatrix.prototype, 'inDegree', function inDegree( j
throw new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', j ) );
}
if ( j >= this._N ) {
throw new RangeError( 'invalid argument. Input argument cannot exceed matrix dimensions. Value: `' + j + '`.' );
throw new RangeError( format( 'invalid argument. Input argument cannot exceed matrix dimensions. Value: `%u`.', j ) );
}
// Iterate over the rows and add up the number of edges...
deg = 0;
Expand Down Expand Up @@ -582,7 +582,7 @@ setReadOnly( CompactAdjacencyMatrix.prototype, 'inEdges', function inEdges( j )
throw new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', j ) );
}
if ( j >= this._N ) {
throw new RangeError( 'invalid argument. Input argument cannot exceed matrix dimensions. Value: `' + j + '`.' );
throw new RangeError( format( 'invalid argument. Input argument cannot exceed matrix dimensions. Value: `%u`.', j ) );
}
// Iterate over the rows and retrieve edges...
edges = [];
Expand Down
7 changes: 4 additions & 3 deletions try-function/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@
'use strict';

var proc = require( 'process' );
var format = require( '@stdlib/string/format' );
var wrap = require( './../lib' );

function beep( str ) {
if ( typeof str !== 'string' ) {
throw new TypeError( 'invalid argument. Must provide a string. Value: `' + str + '`.' );
throw new TypeError( format( 'invalid argument. Must provide a string. Value: `%s`.', str ) );
}
return 'beep ' + str;
}

function boop( str, clbk ) {
if ( typeof str !== 'string' ) {
throw new TypeError( 'invalid argument. Must provide a string. Value: `' + str + '`.' );
throw new TypeError( format( 'invalid argument. Must provide a string. Value: `%s`.', str ) );
}
setTimeout( done, 1000 );

function done() {
if ( str !== 'beep' ) {
throw new Error( 'invalid argument. String must equal `beep`. Value: `' + str + '`.' );
throw new Error( format( 'invalid argument. String must equal `beep`. Value: `%s`.', str ) );
}
clbk( str + ' boop' );
}
Expand Down

0 comments on commit 658462d

Please sign in to comment.