From 52b4d950281b1c66ab66dab8a389fc6924ed3871 Mon Sep 17 00:00:00 2001 From: WFH Brian Date: Sat, 29 Jun 2024 11:59:03 -0400 Subject: [PATCH] improved error reporting re https://github.com/brianpetro/obsidian-smart-connections/issues/646#issuecomment-2198236836 --- smart-entities/smart_entities.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smart-entities/smart_entities.js b/smart-entities/smart_entities.js index 6acac16e..ee47939c 100644 --- a/smart-entities/smart_entities.js +++ b/smart-entities/smart_entities.js @@ -276,8 +276,8 @@ exports.cos_sim = cos_sim; // DO: Extract to separate files class SmartNotes extends SmartEntities { async import(files, opts= {}) { + let batch = []; try{ - let batch = []; const timeoutDuration = 10000; // Timeout duration in milliseconds (e.g., 10000 ms for 10 seconds) let i = 0; for(i = 0; i < files.length; i++){ @@ -335,8 +335,8 @@ class SmartNotes extends SmartEntities { this.env.main.notices.show('done initial scan', [`Making Smart Connections...`, `Done importing Smart Notes.`], { timeout: 3000 }); this.ensure_embeddings(); }catch(e){ - console.log("error importing blocks"); - console.log(e); + console.warn("error importing notes: ", e); + console.warn({batch}); } } async ensure_embeddings(show_notice = false) {