diff --git a/static_core/runtime/runtime.cpp b/static_core/runtime/runtime.cpp index 48323b11de91e0fc0030089662c72699b7b33306..ea2e6cd7b856c4ee0003d55264c04d5e08d17049 100644 --- a/static_core/runtime/runtime.cpp +++ b/static_core/runtime/runtime.cpp @@ -795,12 +795,22 @@ bool Runtime::HandleAotOptions() if (!aotFiles.empty()) { for (auto &fname : aotFiles) { auto res = FileManager::LoadAnFile(fname, true); +#ifdef PANDA_TARGET_OHOS + if (!res) { + LOG(ERROR, AOT) << "Failed to load AoT file: " << res.Error(); + continue; + } + if (!res.Value()) { + LOG(ERROR, AOT) << "Failed to load '" << fname << "' with unknown reason"; + } +#else if (!res) { LOG(FATAL, AOT) << "Failed to load AoT file: " << res.Error(); } if (!res.Value()) { LOG(FATAL, AOT) << "Failed to load '" << fname << "' with unknown reason"; } +#endif } }