mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 10:40:21 +00:00
unify stod/stoi invalid_argument::what parse
This is a hack to check whether given invalid_argument message belongs to stoi/stod. It is usually used to catch non-numeric user input where a number was expected.
This commit is contained in:
@@ -1416,8 +1416,7 @@ static void *display_decklink_init(struct module *parent, const char *fmt, unsig
|
||||
try {
|
||||
succeeded = settings_init(s, fmt, cardId);
|
||||
} catch (exception &e) {
|
||||
if (strcmp(e.what(), "stoi") == 0 ||
|
||||
strcmp(e.what(), "stod") == 0) {
|
||||
if (invalid_arg_is_numeric(e.what())) {
|
||||
MSG(ERROR, "Invalid number passed where numeric "
|
||||
"argument expected!\n");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user