@@ -85,7 +85,9 @@ def log_to_neuracore_on_change_callback(
8585 else :
8686 print (f"\n ⚠️ Unknown logging function: { name } " )
8787 except Exception as e :
88- print (f"\n ⚠️ Failed to call { name } to Neuracore: { e } " )
88+ print (f"\n ⚠️ Failed to call { name } to Neuracore. Exception: { e } " )
89+ print ("Traceback:" )
90+ traceback .print_exc ()
8991
9092
9193def on_button_a_pressed () -> None :
@@ -132,14 +134,18 @@ def on_button_rj_pressed() -> None:
132134 nc .start_recording ()
133135 print ("✓ 🔴 Recording started (Button RJ)" )
134136 except Exception as e :
135- print (f"✗ Failed to start recording: { e } " )
137+ print (f"✗ Failed to start recording. Exception: { e } " )
138+ print ("Traceback:" )
139+ traceback .print_exc ()
136140 else :
137141 # Stop recording
138142 try :
139143 nc .stop_recording ()
140144 print ("✓ ⏹️ Recording stopped (Button RJ)" )
141145 except Exception as e :
142- print (f"✗ Failed to stop recording: { e } " )
146+ print (f"✗ Failed to stop recording. Exception: { e } " )
147+ print ("Traceback:" )
148+ traceback .print_exc ()
143149
144150
145151if __name__ == "__main__" :
@@ -298,11 +304,9 @@ def on_button_rj_pressed() -> None:
298304 except KeyboardInterrupt :
299305 print ("\n 👋 Interrupt received - shutting down gracefully..." )
300306 except Exception as e :
301- print (f"\n ❌ Demo error: { e } " )
302- import traceback
303-
307+ print (f"\n ❌ Demo error. Exception: { e } " )
308+ print ("Traceback:" )
304309 traceback .print_exc ()
305-
306310 # Cleanup
307311 print ("\n 🧹 Cleaning up..." )
308312
@@ -313,7 +317,9 @@ def on_button_rj_pressed() -> None:
313317 nc .cancel_recording ()
314318 print ("✓ Recording cancelled" )
315319 except Exception as e :
316- print (f"⚠️ Error cancelling recording: { e } " )
320+ print (f"⚠️ Error cancelling recording. Exception: { e } " )
321+ print ("Traceback:" )
322+ traceback .print_exc ()
317323
318324 # shutdown threads
319325 nc .logout ()
0 commit comments