I would like to print file name and line number to log file, similar to __FILE__ and __LINE__ is SV.
- Is it possible?
- Can I print the stack, as
stack()in SV behaves?
Thanks!
I would like to print file name and line number to log file, similar to __FILE__ and __LINE__ is SV.
stack() in SV behaves?Thanks!
In e, there is no "general" syntax to access module name or line number, but there exists a syntax that can be used in
define asmacros. For example, you can define a macro like this, to print an expression along with the current line and module name:Regarding the second question, there exists a predefined global method
print_stack_trace().