Skip to content

Commit cd816d4

Browse files
committed
JSI might throw non-hresult exceptions
1 parent 3a59452 commit cd816d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

package/windows/ReactNativeXaml/XamlObject.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,15 @@ jsi::Value XamlObject::get(jsi::Runtime& rt, const jsi::PropNameID& nameId) noex
159159
});
160160
return IInspectableToValue(rt, res);
161161
}
162+
162163
}
163-
catch (const winrt::hresult& hr) {
164-
OutputDebugStringA(std::to_string(hr.value).c_str());
164+
catch (const std::exception& exc) {
165+
OutputDebugStringA(__FUNCTION__);
166+
OutputDebugStringA(": ");
167+
OutputDebugStringA(exc.what());
165168
OutputDebugStringA("\n");
166169
}
170+
167171
return jsi::HostObject::get(rt, nameId);
168172
}
169173

0 commit comments

Comments
 (0)