summaryrefslogtreecommitdiff
path: root/src/system.yy
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahmubashshir@gmail.com>2024-11-16 00:32:45 +0600
committerLibravatar Mubashshir <ahmubashshir@gmail.com>2024-11-16 00:32:45 +0600
commit47d602cf884b14e4c529286238e2085fe97338d7 (patch)
tree8d7bb77e1dac06f96845ff6c4d092f3a8d4cb0c3 /src/system.yy
parent1f0ff6b0675f514b394c2c6fd44e4ce32b84c7b0 (diff)
downloadlog-parser-47d602cf884b14e4c529286238e2085fe97338d7.tar.gz
log-parser-47d602cf884b14e4c529286238e2085fe97338d7.zip
Add util string formatterHEADmaster
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
Diffstat (limited to 'src/system.yy')
-rw-r--r--src/system.yy6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/system.yy b/src/system.yy
index cd6ddc9..0727213 100644
--- a/src/system.yy
+++ b/src/system.yy
@@ -27,6 +27,7 @@ bool legacy = true;
#include <cstdint>
#include "lexer.h"
#include "location.h"
+#include "util.h"
}
//%locations
@@ -69,7 +70,8 @@ block_end:
ofstream f(p, ios_base::out | ios_base::binary);
msg.SerializeToOstream(&f);
f.close();
- }
+ } else
+ throw syntax_error(string_format("Block EPOCH mismatch: begin:%llu, end:%llu", msg.epoch(), $ULONG));
msg.Clear();
}
@@ -275,7 +277,7 @@ namespace yy
// Report an error to the user.
auto parser::error (const std::string& msg) -> void
{
- std::cerr << msg << " on line " << lexer.lineno() << '\n';
+ std::cerr << "\nERROR: " << msg << " on line " << lexer.lineno() - 1<< '\n';
}
}