Show a message box when parsing the YT API response fails
This commit is contained in:
parent
c41d8f7157
commit
a6fa67bf5a
1
yt.cpp
1
yt.cpp
|
@ -63,6 +63,7 @@ static json api_request(const std::string &url, std::map<std::string, std::strin
|
||||||
try {
|
try {
|
||||||
return json::parse(data);
|
return json::parse(data);
|
||||||
} catch (json::exception &err) {
|
} catch (json::exception &err) {
|
||||||
|
tui_abort("Failed to parse YouTube API response:\n%s", err.what());
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue