Browse files

error messages added

  • Loading branch information...
1 parent e10e720 commit 8c26ae97e7b7dad35b1acbf6a02630bd458bb0e5 @afelix afelix committed Mar 8, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/freeze.js
View
4 lib/freeze.js
@@ -62,8 +62,8 @@ var freeze = exports.freeze = function(filePath, content) {
if (_freezeDir) {
if (content === undefined) {
- if (!FS.existsSync(filePath)) throw new Error();
- if (FS.statSync(filePath).isDirectory()) throw new Error();
+ if (!FS.existsSync(filePath)) throw new Error("No such file or directory: " + filePath);
+ if (FS.statSync(filePath).isDirectory()) throw new Error("Is a directory (file needed): " + filePath);
content = FS.readFileSync(filePath);
}

0 comments on commit 8c26ae9

Please sign in to comment.