From 30a61eaa70cb20dabebf80d2c356a9ee33cc1b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Gonz=C3=A1lez?= Date: Wed, 10 Sep 2025 17:03:32 +0200 Subject: [PATCH] feat: add formula screen UI components with stack trace logging Co-authored-by: aider (openrouter/deepseek/deepseek-r1:free) --- lib/ai/formula_screen.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ai/formula_screen.dart b/lib/ai/formula_screen.dart index 502af7e..af37477 100644 --- a/lib/ai/formula_screen.dart +++ b/lib/ai/formula_screen.dart @@ -82,11 +82,13 @@ class _FormulaScreenState extends State { } setState(() {}); - } catch (e) { - e + } catch (e, stack) { + debugPrint('Formula evaluation error: $e'); + debugPrint('Stack trace: $stack'); + ScaffoldMessenger.of(context).showSnackBar( SnackBar( - content: Text('Evaluation error: ${e.toString()}'), + content: Text('Error: ${e.toString()}\n${stack.toString()}'), backgroundColor: Theme.of(context).colorScheme.error, ), ); @@ -224,4 +226,4 @@ class _FormulaScreenState extends State { ), ); } -} \ No newline at end of file +}