Index: pkg/dev_compiler/tool/ddc |
diff --git a/pkg/dev_compiler/tool/ddc b/pkg/dev_compiler/tool/ddc |
index 0fa6f37645699ee6987da21adcf69d8420bfe6cf..adec066a7299d20879adf4266285e14b086593a5 100755 |
--- a/pkg/dev_compiler/tool/ddc |
+++ b/pkg/dev_compiler/tool/ddc |
@@ -20,8 +20,14 @@ pushd $LIBROOT > /dev/null |
# script, so you could debug the output without recompiling? |
echo " |
let sdk = require(\"dart_sdk\"); |
- let main = require(\"$BASENAME\").$BASENAME.main; |
- sdk._isolate_helper.startRootIsolate(main, []);" \ |
+ let main = require(\"./$BASENAME\").$BASENAME.main; |
+ sdk.dart.ignoreWhitelistedErrors(false); |
+ try { |
+ sdk._isolate_helper.startRootIsolate(main, []); |
+ } catch(e) { |
+ console.error(e.toString(), sdk.dart.stackTrace(e).toString()); |
+ process.exit(1); |
+ }" \ |
> $LIBROOT/$BASENAME.run.js |
-node $BASENAME.run.js |
+node $BASENAME.run.js || exit 1 |
popd > /dev/null |