log error message/stack

This commit is contained in:
MaxRobinsonTheGreat 2025-02-18 00:15:34 -06:00
parent 821dbae5c3
commit 7d9257036c
2 changed files with 4 additions and 2 deletions

View file

@ -103,7 +103,8 @@ export class Agent {
} catch (error) {
// Ensure we're not losing error details
console.error('Agent start failed with error')
console.error(error)
console.error(error.message);
console.error(error.stack);
throw error; // Re-throw with preserved details
}

View file

@ -58,7 +58,8 @@ const argv = yargs(args)
await agent.start(argv.profile, argv.load_memory, argv.init_message, argv.count_id, argv.task_path, argv.task_id);
} catch (error) {
console.error('Failed to start agent process:');
console.error(error);
console.error(error.message);
console.error(error.stack);
process.exit(1);
}
})();