Replace throw 0 with real exceptions or assertions.
This commit is contained in:
@@ -26,9 +26,9 @@ struct parse_driver {
|
||||
parse_driver(const std::string& file)
|
||||
: file_name(file), file_offset(0) {}
|
||||
|
||||
void run_parse() {
|
||||
bool run_parse() {
|
||||
file_stream.open(file_name);
|
||||
if(!file_stream.good()) throw 0;
|
||||
if(!file_stream.good()) return false;
|
||||
line_offsets.push_back(0);
|
||||
yyscan_t scanner;
|
||||
scanner_init(this, &scanner);
|
||||
@@ -36,6 +36,7 @@ struct parse_driver {
|
||||
parser();
|
||||
scanner_destroy(&scanner);
|
||||
read_file = string_stream.str();
|
||||
return true;
|
||||
}
|
||||
|
||||
int get() {
|
||||
|
||||
Reference in New Issue
Block a user