update error logging

cutting all kind of prefixes for prompt making
This commit is contained in:
2026-01-28 16:40:29 +03:00
parent 9a76d36568
commit 63c64dfa8e
19 changed files with 107 additions and 100 deletions
+5 -5
View File
@@ -71,7 +71,7 @@ import {GeminiGetModel} from "./commands/gemini-get-model";
import {GeminiSetModel} from "./commands/gemini-set-model";
import {Debug} from "./commands/debug";
process.setUncaughtExceptionCaptureCallback(console.error);
process.setUncaughtExceptionCaptureCallback(logError);
Environment.load();
DatabaseManager.init();
@@ -112,7 +112,7 @@ export function abortOllamaRequest(uuid: string): boolean {
updateOllamaRequest(uuid, {...request, done: true});
return true;
} catch (e) {
console.error(e);
logError(e);
return false;
}
}
@@ -227,7 +227,7 @@ async function main() {
console.log("Bot started!");
} catch (error) {
console.error(error);
logError(error);
}
}
@@ -336,7 +336,7 @@ bot.on("inline_query", async (query) => {
results: queryResults,
});
} catch (e) {
console.error(e);
logError(e);
}
} else {
await bot.answerInlineQuery({
@@ -351,4 +351,4 @@ bot.on("callback_query", async (query) => {
await findAndExecuteCallbackCommand(callbackCommands, query);
});
main().catch(console.error);
main().catch(logError);