These exceptions were blocking the actual, useful exceptions.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3212 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2016-04-18 19:58:09 +00:00
parent 8737c7558a
commit 8a1085d5a3

View File

@ -761,7 +761,7 @@ void Task::require(const v8::FunctionCallbackInfo<v8::Value>& args) {
script->Run(); script->Run();
std::cout << "Script " << path << " completed\n"; std::cout << "Script " << path << " completed\n";
} else { } else {
std::cerr << "Failed to compile script.\n"; std::cerr << "Failed to compile " << path << ".\n";
} }
global->Set(v8::String::NewFromUtf8(args.GetIsolate(), "exports"), oldExports); global->Set(v8::String::NewFromUtf8(args.GetIsolate(), "exports"), oldExports);
args.GetReturnValue().Set(exports); args.GetReturnValue().Set(exports);
@ -787,7 +787,7 @@ v8::Handle<v8::Value> Task::executeSource(v8::Handle<v8::String>& source, v8::Ha
if (!script.IsEmpty()) { if (!script.IsEmpty()) {
script->Run(); script->Run();
} else { } 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 { } else {
result = _isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(_isolate, (std::string("Failed to load ") + *nameValue + ".").c_str()))); 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<v8::Value>& args) {
if (!script.IsEmpty()) { if (!script.IsEmpty()) {
script->Run(); script->Run();
} else { } 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); global->Set(v8::String::NewFromUtf8(args.GetIsolate(), "exports"), oldExports);
args.GetReturnValue().Set(exports); args.GetReturnValue().Set(exports);