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 +}