Skip to content

Commit 08802ad

Browse files
committed
fix: log a metadata format mismatch
The exception thrown for metadata in another format is raised before anything is set up to report it, so on its own it never reached logcat.
1 parent e1fc47a commit 08802ad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎test-app/runtime/src/main/cpp/MetadataReader.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ void MetadataReader::Initialize(uint32_t nodesLength, uint8_t *nodeData, uint32_
3131
ss << "The app's metadata is not in the format this runtime reads (found 0x" << hex
3232
<< format << ", expected 0x" << FORMAT
3333
<< "). It was generated for a different version of the runtime, or is damaged. Rebuild the app.";
34+
// Logged here as well: nothing is set up yet to report an exception this early.
35+
__android_log_print(ANDROID_LOG_ERROR, "TNS.error", "%s", ss.str().c_str());
3436
throw NativeScriptException(ss.str());
3537
}
3638

0 commit comments

Comments
 (0)