-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue394 #397
base: master
Are you sure you want to change the base?
Issue394 #397
Conversation
If the node is named with only digit symbols, it can be the reason of the error: terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 12157) >= this->size() (which is 3) Aborted (core dumped) A function added to phylotree.cc shows a possible explanation
Added an std::out_of_range exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, except for some indentation and a possibly unnecessary include.
int error_message = parser.parse(); | ||
if(error_message == 1){ | ||
throw ProjectError("the parsing of " + filename + " has been unsuccessful. Please check, whether the syntax of your input file is correct" ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
std::cout << "An out_of_range exception occurred: " << e.what() << std::endl; | ||
throw ProjectError("the parsing of " + filename + " has been unsuccessful. Probably, at least one node named with only digits. Please check, whether the syntax of your input file is correct" ); | ||
} | ||
fb.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation inconsistent with previous line
src/phylotree.cc
Outdated
#include <iostream> | ||
#include <stdio.h> | ||
#include <stack> | ||
#include <string> | ||
#include <regex> | ||
#include <stdexcept> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove duplicates and unnecessary includes. Is regex used at all?
Added catching an exception for the error "An out_of_range exception occurred: vector::_M_range_check: __n (which is 12157) >= this->size() (which is 3)" possibly caused by an error in .nwk file