20 General utilities library [utilities]

20.21 Stacktrace [stacktrace]

20.21.3 Class stacktrace_­entry [stacktrace.entry]

20.21.3.4 Query [stacktrace.entry.query]

[Note 1:
All the stacktrace_­entry query functions treat errors other than memory allocation errors as โ€œno information availableโ€ and do not throw in that case.
โ€” end note]
string description() const;
Returns: A description of the evaluation represented by *this, or an empty string.
Throws: bad_­alloc if memory for the internal data structures or the resulting string cannot be allocated.
string source_file() const;
Returns: The presumed or actual name of the source file ([cpp.predefined]) that lexically contains the expression or statement whose evaluation is represented by *this, or an empty string.
Throws: bad_­alloc if memory for the internal data structures or the resulting string cannot be allocated.
uint_least32_t source_line() const;
Returns: 0, or a 1-based line number that lexically relates to the evaluation represented by *this.
If source_­file returns the presumed name of the source file, returns the presumed line number; if source_­file returns the actual name of the source file, returns the actual line number.
Throws: bad_­alloc if memory for the internal data structures cannot be allocated.