@@ -664,11 +664,11 @@ jsi::Object JSCRuntime::createObject(std::shared_ptr<jsi::HostObject> ho) {
664
664
static JSValueRef getProperty (
665
665
JSContextRef ctx,
666
666
JSObjectRef object,
667
- JSStringRef propName ,
667
+ JSStringRef propertyName ,
668
668
JSValueRef* exception ) {
669
669
auto proxy = static_cast <HostObjectProxy*>(JSObjectGetPrivate (object));
670
670
auto & rt = proxy->runtime ;
671
- jsi::PropNameID sym = rt.createPropNameID (propName );
671
+ jsi::PropNameID sym = rt.createPropNameID (propertyName );
672
672
jsi::Value ret;
673
673
try {
674
674
ret = proxy->hostObject ->get (rt, sym);
@@ -681,20 +681,14 @@ jsi::Object JSCRuntime::createObject(std::shared_ptr<jsi::HostObject> ho) {
681
681
.getPropertyAsFunction (rt, " Error" )
682
682
.call (
683
683
rt,
684
- std::string (" Exception in HostObject::get(propName:" )
685
- + JSStringToSTLString (propName)
686
- + std::string (" ): " ) + ex.what ());
684
+ std::string (" Exception in HostObject::get: " ) + ex.what ());
687
685
*exception = rt.valueRef (excValue);
688
686
return JSValueMakeUndefined (ctx);
689
687
} catch (...) {
690
688
auto excValue =
691
689
rt.global ()
692
690
.getPropertyAsFunction (rt, " Error" )
693
- .call (
694
- rt,
695
- std::string (" Exception in HostObject::get(propName:" )
696
- + JSStringToSTLString (propName)
697
- + std::string (" ): <unknown>" ));
691
+ .call (rt, std::string (" Exception in HostObject::get: " ) + JSStringToSTLString (propertyName));
698
692
*exception = rt.valueRef (excValue);
699
693
return JSValueMakeUndefined (ctx);
700
694
}
@@ -724,20 +718,14 @@ jsi::Object JSCRuntime::createObject(std::shared_ptr<jsi::HostObject> ho) {
724
718
.getPropertyAsFunction (rt, " Error" )
725
719
.call (
726
720
rt,
727
- std::string (" Exception in HostObject::set(propName:" )
728
- + JSStringToSTLString (propName)
729
- + std::string (" ): " ) + ex.what ());
721
+ std::string (" Exception in HostObject::set: " ) + ex.what ());
730
722
*exception = rt.valueRef (excValue);
731
723
return false ;
732
724
} catch (...) {
733
725
auto excValue =
734
726
rt.global ()
735
727
.getPropertyAsFunction (rt, " Error" )
736
- .call (
737
- rt,
738
- std::string (" Exception in HostObject::set(propName:" )
739
- + JSStringToSTLString (propName)
740
- + std::string (" ): <unknown>" ));
728
+ .call (rt, " Exception in HostObject::set: <unknown>" );
741
729
*exception = rt.valueRef (excValue);
742
730
return false ;
743
731
}
0 commit comments