31 class Report :
public std::exception {
41 while(!
mLine.empty() && (
mLine.back() ==
'\n' ||
mLine.back() ==
'\r')) {
Report exception class which contains a completely constructed message with optional line marker,...
Definition Report.hpp:31
Report(const Report &)=default
Report & operator=(const Report &)=default
String mContext
Definition Report.hpp:77
String mMessage
Definition Report.hpp:78
const char * what() const noexcept override
Overrides the 'std::exception::what' function.
Definition Report.hpp:47
Vector< String > mHints
Definition Report.hpp:81
const String & getLine() const
Returns the line string where the report occured. This line never has new-line characters at its end.
Definition Report.hpp:62
const String & getContext() const
Returns the context description string (e.g. a function name where the report occured)....
Definition Report.hpp:56
const String & getMarker() const
Returns the line marker string to highlight the area where the report occured.
Definition Report.hpp:65
String mMarker
Definition Report.hpp:80
Report(const ReportTypes type, const String &message, const String &line, const String &marker, const String &context="")
Definition Report.hpp:38
ReportTypes getType() const
Returns the type of this report.
Definition Report.hpp:53
void takeHints(Vector< String > &&hints)
Moves the specified hints into this report.
Definition Report.hpp:50
bool hasLine() const
Returns true if this report has a line with line marker.
Definition Report.hpp:73
const Vector< String > & getHints() const
Returns the list of optional hints of the report.
Definition Report.hpp:68
Report(const ReportTypes type, const String &message, const String &context="")
Definition Report.hpp:36
ReportTypes mType
Definition Report.hpp:76
String mLine
Definition Report.hpp:79
const String & getMessage() const
Returns the message string.
Definition Report.hpp:59
ReportTypes
Report types enumeration.
Definition Report.hpp:18
@ Warning
Warning message.
@ Info
Standard information.
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25