Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Trek Glowacki committed Oct 6, 2016
1 parent 4c0e93a commit 87dcbab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pretender.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ function interceptor(pretender, nativeRequest) {
FakeRequest.prototype = proto;

if (nativeRequest.prototype._passthroughCheck) {
throw new Error('You created a second Pretender instance while there already one running. ' +
'Running two Pretender servers at once will lead to unexpected results!');
throw new Error('You created a second Pretender instance while there was already one running. ' +
'Running two Pretender servers at once will lead to unexpected results!' +
'Please call .shutdown() on your instances when you no longer need them to respond.');
}
return FakeRequest;
}
Expand Down

0 comments on commit 87dcbab

Please sign in to comment.