@@ -359,7 +359,6 @@ std::shared_ptr<CtxValue> JSCCtx::DefineClass(const string_view& name,
359359 JSObjectCallAsFunction (context_, define_property, object, 3 , values, &exception);
360360 if (exception) {
361361 SetException (std::make_shared<JSCCtxValue>(context_, exception));
362- FOOTSTONE_LOG (ERROR) << GetExceptionMessage (exception_);
363362 return nullptr ;
364363 }
365364 }
@@ -895,23 +894,20 @@ std::shared_ptr<CtxValue> JSCCtx::CallFunction(const std::shared_ptr<CtxValue>&
895894 auto function_object = JSValueToObject (context_, function_value->value_ , &exception);
896895 if (exception) {
897896 SetException (std::make_shared<JSCCtxValue>(context_, exception));
898- FOOTSTONE_LOG (ERROR) << GetExceptionMessage (exception_);
899897 return nullptr ;
900898 }
901899
902900 auto receiver_value = std::static_pointer_cast<JSCCtxValue>(receiver);
903901 auto receiver_object = JSValueToObject (context_, receiver_value->value_ , &exception);
904902 if (exception) {
905903 SetException (std::make_shared<JSCCtxValue>(context_, exception));
906- FOOTSTONE_LOG (ERROR) << GetExceptionMessage (exception_);
907904 return nullptr ;
908905 }
909906
910907 if (argc <= 0 ) {
911908 auto ret_value_ref = JSObjectCallAsFunction (context_, function_object, receiver_object, 0 , nullptr , &exception);
912909 if (exception) {
913910 SetException (std::make_shared<JSCCtxValue>(context_, exception));
914- FOOTSTONE_LOG (ERROR) << GetExceptionMessage (exception_);
915911 return nullptr ;
916912 }
917913 return std::make_shared<JSCCtxValue>(context_, ret_value_ref);
@@ -926,7 +922,6 @@ std::shared_ptr<CtxValue> JSCCtx::CallFunction(const std::shared_ptr<CtxValue>&
926922 auto ret_value_ref = JSObjectCallAsFunction (context_, function_object, receiver_object, argc, values, &exception);
927923 if (exception) {
928924 SetException (std::make_shared<JSCCtxValue>(context_, exception));
929- FOOTSTONE_LOG (ERROR) << GetExceptionMessage (exception_);
930925 return nullptr ;
931926 }
932927
@@ -939,7 +934,7 @@ std::shared_ptr<CtxValue> JSCCtx::CallFunction(const std::shared_ptr<CtxValue>&
939934
940935string_view JSCCtx::GetExceptionMessage (const std::shared_ptr<CtxValue>& exception) {
941936 if (!exception) {
942- return string_view ();
937+ return string_view (" " );
943938 }
944939
945940 std::shared_ptr<CtxValue> msg_obj = CopyNamedProperty (exception, string_view (kMessageStr , ARRAY_SIZE (kMessageStr ) - 1 ));
@@ -1142,7 +1137,6 @@ std::shared_ptr<CtxValue> JSCCtx::RunScript(const string_view& data,
11421137
11431138 if (exception) {
11441139 SetException (std::make_shared<JSCCtxValue>(context_, exception));
1145- FOOTSTONE_LOG (ERROR) << GetExceptionMessage (exception_);
11461140 return nullptr ;
11471141 }
11481142
0 commit comments