wrench-js
wrench-js copied to clipboard
copyDirSyncRecursive uses multiple ways to communicate errors
copyDirSyncRecursive both returns and throws errors, depending on where the error happens.
So you'd have to
try {
var e = wrench.copyDirSyncRecursive();
if( e ) {
throw e;
}
} catch( e ) {
// Handle error
}
I don't see why this is necessary. throw should be the way to go here.
:+1: this bit me please be consistent.