How show message of exception?

Hello,

I have the following code :

def test():
	try:
		// function code who throw exception
	except:
		display.print('exception')

With this code I have no idea on the exception who is raised.

What is the code to show message of exception on META (import clause and except clause) ?

Thanks in advance

try

try:
    # your code here
except ex:
    print(ex)

and then in the serial monitor you’ll get detailed information on the exception!

2 Likes

With this code : don’t show the exception on the screen of META.

Yes, as Sorunome wrote it it’s on serial monitor :wink: It’s not really the answer about the question you asked before but it’s how it’s possible atm it seems.