Skip to content

Commit

Permalink
Warn if require'd module is not found
Browse files Browse the repository at this point in the history
Fixes #321
  • Loading branch information
jnordberg committed Jun 15, 2017
1 parent ea4c55d commit 5766cb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/environment.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ class Environment extends EventEmitter
logger.verbose "loading module '#{ id }' available in locals as '#{ alias }'"
if @locals[alias]?
logger.warn "module '#{ id }' overwrites previous local with the same key ('#{ alias }')"
@locals[alias] = @loadModule id
try
@locals[alias] = @loadModule id
catch error
logger.warn "unable to load '#{ id }': #{ error.message }"

return

Expand Down

0 comments on commit 5766cb5

Please sign in to comment.