Is your feature request related to a problem? Please describe.
No. Not a problem, per se. A missing capability, though: Compile-time knowledge of the source code location that can be useful for cut & paste error logging, etc.
Describe the solution you'd like
Add useful properties to the Label interface:
@RO String sourceFile; - the name of the source file containing the label
@RO Path sourcePath; - the path to the source file, relative to the directory containing the root of the compilation unit (i.e. typically the module file location)
@RO String name; - the label name
@RO Int lineNumber; - the 0-based (or should it be 1-based???) line number within the file where the label is located
@RO Int lineOffset; - the 0-based (or should it be 1-based???) offset within the line where the label is located
Describe alternatives you've considered
- C macro style:
__FILE__ and __LINE__
- take an exception and get its stack trace
Additional context
n/a
Is your feature request related to a problem? Please describe.
No. Not a problem, per se. A missing capability, though: Compile-time knowledge of the source code location that can be useful for cut & paste error logging, etc.
Describe the solution you'd like
Add useful properties to the Label interface:
@RO String sourceFile;- the name of the source file containing the label@RO Path sourcePath;- the path to the source file, relative to the directory containing the root of the compilation unit (i.e. typically the module file location)@RO String name;- the label name@RO Int lineNumber;- the 0-based (or should it be 1-based???) line number within the file where the label is located@RO Int lineOffset;- the 0-based (or should it be 1-based???) offset within the line where the label is locatedDescribe alternatives you've considered
__FILE__and__LINE__Additional context
n/a