Skip to content

Commit

Permalink
error messages added
Browse files Browse the repository at this point in the history
  • Loading branch information
afelix committed Mar 8, 2013
1 parent e10e720 commit 8c26ae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/freeze.js
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8c26ae9

Please sign in to comment.