Permalink
Browse files

Wrap error strings with Error class

  • Loading branch information...
josh committed Mar 31, 2011
1 parent 870a267 commit c11c11326e7e20cb65e86440c0044d7fc7c60407
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/stitch.js
  2. +2 −2 src/stitch.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -169,7 +169,7 @@ exports.Package = class Package
base = expandedPath + "/"
if sourcePath.indexOf(base) is 0
return callback null, sourcePath.slice base.length
- callback "#{path} isn't in the require path"
+ callback new Error "#{path} isn't in the require path"
compileFile: (path, callback) ->
extension = extname(path).slice(1)
@@ -196,7 +196,7 @@ exports.Package = class Package
err = new Error "can't compile #{path}\n#{err}"
callback err
else
- callback "no compiler for '.#{extension}' files"
+ callback new Error "no compiler for '.#{extension}' files"
walkTree: (directory, callback) ->
fs.readdir directory, (err, files) =>

0 comments on commit c11c113

Please sign in to comment.