Skip to content

Commit 3ca059f

Browse files
committed
refactor: align ndarray/iter/rows with namespace error-construction conventions
Wrapped the dim-check `TypeError` in `format(...)` to match the dominant error-construction pattern in the file (other throws already use `format()`, including a static-string `Error` on line 113) and across the `ndarray/iter` namespace, where sibling packages with analogous dim-checks (`subarrays`, `stacks`, `interleave-subarrays`) wrap the throw in `format()`. Message text is preserved exactly.
1 parent 320f969 commit 3ca059f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/node_modules/@stdlib/ndarray/iter/rows/lib

lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function nditerRows( x ) {
120120

121121
// Ensure that the input array has sufficient dimensions...
122122
if ( ndims < 2 ) {
123-
throw new TypeError( 'invalid argument. First argument must be an ndarray having at least two dimensions.' );
123+
throw new TypeError( format( 'invalid argument. First argument must be an ndarray having at least two dimensions.' ) );
124124
}
125125
// Check whether the input array is empty...
126126
N = numel( shape );

0 commit comments

Comments
 (0)