diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-04-07 14:36:32 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-04-07 14:36:32 -0600 |
commit | 00c507cc52ceb0d879c43e88e70de0028ff47fc6 (patch) | |
tree | 170344ac04798bb87c06ae767b52365e914c4451 /src/libutil/error.hh | |
parent | 55c96b64e4de2b7e3443124bb0aa17ecc9188940 (diff) |
columnRange -> column
Diffstat (limited to 'src/libutil/error.hh')
-rw-r--r-- | src/libutil/error.hh | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh index a8a1afbca..e3bb2c1dd 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -17,20 +17,13 @@ typedef enum { elError } ErrLevel; -class ColumnRange -{ -public: - unsigned int start; - unsigned int len; -}; - class ErrorInfo; class ErrLine { public: int lineNumber; - std::optional<ColumnRange> columnRange; + int column; std::optional<string> prevLineOfCode; string errLineOfCode; std::optional<string> nextLineOfCode; @@ -107,6 +100,8 @@ public: static std::optional<string> programName; + ErrorInfo& set_name(const string &name) { this->name = name; return *this; } + static ErrorInfo ProgramError(const string &name, const string &description, const std::optional<hintformat> &hf); @@ -165,7 +160,7 @@ private: ErrLine errline; errline.lineNumber = pos.line; - errline.columnRange = { .start = pos.column, .len = 1 }; + errline.column = pos.column; errline.prevLineOfCode = prevloc; errline.errLineOfCode = loc; errline.nextLineOfCode = nextloc; |