From 8a1085d5a3d67d9fed02c590eef4a2085f40b75b Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 18 Apr 2016 19:58:09 +0000 Subject: [PATCH] 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 --- src/Task.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);