KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
is it possible to get source line number at runtime in Delphi? I know JCL debug, but I want to avoid to use it. Also Assert is not exactly what I want. I would like to get something like this, where GetLineNumber would get the source line number. Is it possible to do it without MAP files (anyway will MAP file be generated when I use Assert) ? Is there any example ? function GetLineNumber: integer; begin ??? end; procedure ThisWouldBeGreat; begin if not SomeCondition then LogMemo.Lines.Add('Error on line: ' + IntToStr(GetLineNumber)); end; procedure ThatsWhatIWont; begin Assert(not SomeCondition, 'Error'); end; Thank you
Tags (comma-separated)
Save Edits
Cancel