Fix: require.async module exception delegation
authorFelix Geisendörfer <felix@debuggable.com>
Thu, 3 Jun 2010 10:39:12 +0000 (12:39 +0200)
committerRyan Dahl <ry@tinyclouds.org>
Thu, 3 Jun 2010 16:59:56 +0000 (09:59 -0700)
commit987cbe35c60beee8b80b428bcd97abb2c709b958
treecae9dd9e2accb5ba36e751b0d449f10fadf0b45c
parent55e964ec19e23467576466a5975f8fb91c176ea0
Fix: require.async module exception delegation

The fs.readFile bug was hiding another bug that was causing this test
to pass, even so it was broken:

require.async("../fixtures/throws_error1") in test-module-loading.js

This patch fixes the original test by running _compile within a
try..catch block for _loadScript.

_loadScriptSync also had some useless (deprecated?) code for dealing
with module entry point exceptions. This code was also removed for
greater clarity.
lib/module.js