forked from cory/tildefriends
core: Minor cleanup.
This commit is contained in:
@@ -227,14 +227,12 @@ bool tf_util_report_error(JSContext* context, JSValue value)
|
||||
tf_printf("ERROR: %s\n", string);
|
||||
JS_FreeCString(context, string);
|
||||
|
||||
JSValue stack = JS_GetPropertyStr(context, value, "stack");
|
||||
if (!JS_IsUndefined(stack))
|
||||
const char* stack = tf_util_get_property_as_string(context, value, "stack");
|
||||
if (stack && *stack)
|
||||
{
|
||||
const char* stack_str = JS_ToCString(context, stack);
|
||||
tf_printf("%s\n", stack_str);
|
||||
JS_FreeCString(context, stack_str);
|
||||
tf_printf("%s\n", stack);
|
||||
}
|
||||
JS_FreeValue(context, stack);
|
||||
JS_FreeCString(context, stack);
|
||||
|
||||
tf_task_send_error_to_parent(task, value);
|
||||
is_error = true;
|
||||
|
||||
Reference in New Issue
Block a user