Consolidate error handling until util, too.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3682 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "packetstream.h"
|
||||
#include "serialize.h"
|
||||
#include "task.h"
|
||||
#include "util.js.h"
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
@ -269,7 +270,7 @@ static void _taskstub_on_process_exit(uv_process_t* process, int64_t status, int
|
||||
{
|
||||
JSValue argv[] = { JS_NewInt32(context, status), JS_NewInt32(context, terminationSignal) };
|
||||
JSValue result = JS_Call(context, stub->_on_exit, JS_NULL, 2, argv);
|
||||
tf_task_report_error(stub->_owner, result);
|
||||
tf_util_report_error(context, result);
|
||||
JS_FreeValue(context, result);
|
||||
tf_task_run_jobs(stub->_owner);
|
||||
JS_FreeValue(context, argv[0]);
|
||||
@ -393,7 +394,7 @@ void tf_taskstub_on_error(tf_taskstub_t* stub, JSValue error)
|
||||
if (!JS_IsUndefined(stub->_on_error))
|
||||
{
|
||||
JSValue result = JS_Call(context, stub->_on_error, JS_NULL, 1, &error);
|
||||
tf_task_report_error(stub->_owner, result);
|
||||
tf_util_report_error(context, result);
|
||||
JS_FreeValue(context, result);
|
||||
tf_task_run_jobs(stub->_owner);
|
||||
}
|
||||
|
Reference in New Issue
Block a user