Replay errors show line number of action
I would have done this FOREVER ago but every time I looked in ticpp for a way to get element file positions I somehow missed Row() and Column()
This commit is contained in:
@@ -202,6 +202,13 @@ std::string next_action_type() {
|
||||
return next_action->Value();
|
||||
}
|
||||
|
||||
int next_action_line() {
|
||||
if(next_action == nullptr){
|
||||
throw std::string { "Replay error! No action left to check row" };
|
||||
}
|
||||
return next_action->Row();
|
||||
}
|
||||
|
||||
Element& pop_next_action(std::string expected_action_type) {
|
||||
if(next_action == nullptr){
|
||||
throw std::string { "Replay error! No action left to pop" };
|
||||
|
@@ -38,6 +38,7 @@ extern void record_action(Element& action);
|
||||
extern void record_field_input(cKey key);
|
||||
extern bool has_next_action(std::string type = "");
|
||||
extern std::string next_action_type();
|
||||
extern int next_action_line();
|
||||
extern Element& pop_next_action(std::string expected_action_type="");
|
||||
extern std::map<std::string,std::string> info_from_action(Element& action);
|
||||
extern std::string encode_file(fs::path file);
|
||||
|
Reference in New Issue
Block a user