MCPcopy Create free account
hub / github.com/NativeScript/android / ToString

Method ToString

test-app/runtime/src/main/cpp/NativeScriptException.cpp:177–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177std::string NativeScriptException::ToString() const {
178 std::stringstream ss;
179 if (!m_javaException.IsNull()) {
180 JEnv env;
181 std::string message = GetExceptionMessage(env, m_javaException);
182 std::string stackTrace = GetExceptionStackTrace(env, m_javaException);
183 ss << "Java Exception: " << message << "\n" << stackTrace;
184 } else if (m_javascriptException != nullptr) {
185 ss << "JavaScript Exception: " << m_message << "\n" << m_stackTrace;
186 } else if (!m_message.empty()) {
187 ss << "Exception Message: " << m_message << "\n" << m_stackTrace;
188 } else {
189 ss << "No exception information available.";
190 }
191 return ss.str();
192}
193
194std::string NativeScriptException::GetErrorMessage() const {
195 if (!m_javaException.IsNull()) {

Callers

nothing calls this directly

Calls 2

IsNullMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected