Skip to content

Commit 39f4865

Browse files
sakirr05sakirr
andauthored
fix: distinct shutdown/cleanup debug logs per review (#401)
Co-authored-by: sakirr <sakirahmed75531@gmail.com>
1 parent c050c22 commit 39f4865

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

sdk/runanywhere-web/packages/llamacpp/src/Foundation/LlamaCppBridge.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,24 @@ export class LlamaCppBridge {
638638
}
639639

640640
if (this._module && this._loaded) {
641-
try { this._module._rac_shutdown(); } catch { /* ignore */ }
641+
try {
642+
this._module._rac_shutdown();
643+
} catch (err) {
644+
logger.debug(
645+
`LlamaCpp module shutdown failed (non-fatal): ${err instanceof Error ? err.message : String(err)}`,
646+
);
647+
}
642648
}
643649

644650
// Clean up platform adapter
645651
if (this._platformAdapter) {
646-
try { this._platformAdapter.cleanup(); } catch { /* ignore */ }
652+
try {
653+
this._platformAdapter.cleanup();
654+
} catch (err) {
655+
logger.debug(
656+
`Platform adapter cleanup failed (non-fatal): ${err instanceof Error ? err.message : String(err)}`,
657+
);
658+
}
647659
this._platformAdapter = null;
648660
}
649661

0 commit comments

Comments
 (0)