diff --git a/src/Task.cpp b/src/Task.cpp index fe2c35c5..32886e45 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -761,7 +761,7 @@ void Task::require(const v8::FunctionCallbackInfo& args) { script->Run(); std::cout << "Script " << path << " completed\n"; } else { - std::cerr << "Failed to compile script.\n"; + std::cerr << "Failed to compile " << path << ".\n"; } global->Set(v8::String::NewFromUtf8(args.GetIsolate(), "exports"), oldExports); args.GetReturnValue().Set(exports); @@ -787,7 +787,7 @@ v8::Handle Task::executeSource(v8::Handle& source, v8::Ha if (!script.IsEmpty()) { script->Run(); } else { - result = _isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(_isolate, (std::string("Failed to compile ") + *nameValue + ".").c_str()))); + std::cerr << "Failed to compile " << *nameValue << ".\n"; } } else { result = _isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(_isolate, (std::string("Failed to load ") + *nameValue + ".").c_str()))); @@ -818,7 +818,7 @@ void Task::childRequire(const v8::FunctionCallbackInfo& args) { if (!script.IsEmpty()) { script->Run(); } else { - args.GetReturnValue().Set(args.GetIsolate()->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(args.GetIsolate(), (std::string("Failed to compile ") + *nameValue + ".").c_str())))); + std::cerr << "Failed to compile " << *nameValue << ".\n"; } global->Set(v8::String::NewFromUtf8(args.GetIsolate(), "exports"), oldExports); args.GetReturnValue().Set(exports);