Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

copyDirSyncRecursive uses multiple ways to communicate errors #103

Open
oliversalzburg opened this issue May 20, 2015 · 1 comment
Open

Comments

@oliversalzburg
Copy link

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.

@daniel-white
Copy link

👍 this bit me please be consistent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants