How to I get the exception message as string in GUI

F

fowlertrainer

Hello ,

I want to get the exception error msg in string, but I don't want to
save to file, or print.
I want to show it in memo.

How to I do it ?

gd=GTMain.GameDatas
s=self.Msg
log="Log:\nStart loading"
s.SetLabel(log)
try:
gd.LoadGamesDatas()
log=log+"\nGame datas succesfully loaded."
except:
import traceback
traceback.print_exc() <--------- what I must write ?
log=log+"\An error occured while loading !"
s.SetLabel(log)

Thanx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,933
Members
47,472
Latest member
blackwatermelon

Latest Threads

Top