mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +00:00
parser:: number missing exception now includes where()
This commit is contained in:
parent
3df2f6bf26
commit
f2381688c5
2
util.cpp
2
util.cpp
@ -363,7 +363,7 @@ cld exp_parser::parse(int prio) {
|
||||
else if(number == "i") res = cld(0, 1);
|
||||
else if(number == "p" || number == "pi") res = M_PI;
|
||||
else if(number == "" && next() == '-') { at++; res = -parse(prio); }
|
||||
else if(number == "") throw hr_parse_exception("number missing");
|
||||
else if(number == "") throw hr_parse_exception("number missing, " + where());
|
||||
else if(number == "s") res = ticks / 1000.;
|
||||
else if(number == "ms") res = ticks;
|
||||
else if(number[0] == '0' && number[1] == 'x') res = strtoll(number.c_str()+2, NULL, 16);
|
||||
|
Loading…
Reference in New Issue
Block a user