Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I log the callstack with JCL without using raise exception

Background

We have a problem that sometimes the grid in Devexpress raise exception "Raised EConvertError: Cannot assign a nil to a TFont".

But to trace the real cause of this we have changed Font in cxEdit to be a public property instead with a get and set method. Here I want to log the callstack.

My question

Normally JCL is used to log callstacks when exceptions appear. But how can I log the callstack without using raise exception and show a dialog for the user about this ?

I have found the lines:

var
  GlobalStackList: TJclGlobalStackList;

in JclDebug but I fail to use it. If someone have a example how to get the callstack I would be happy.

Regards Roland Bengtsson

like image 870
Roland Bengtsson Avatar asked Mar 21 '11 07:03

Roland Bengtsson


1 Answers

This answer shows how to do it with JCL by calling JclCreateStackList.

like image 137
Lars Truijens Avatar answered Oct 04 '22 02:10

Lars Truijens