Use brace initializer for exceptions.
This commit is contained in:
parent
2ee354c7a3
commit
88ead94bff
|
@ -78,7 +78,7 @@ string MastodonAPI::get_stream_id(const stream_type type,
|
||||||
{
|
{
|
||||||
if (!id)
|
if (!id)
|
||||||
{
|
{
|
||||||
throw runtime_error("No hashtag given.");
|
throw runtime_error{"No hashtag given."};
|
||||||
}
|
}
|
||||||
return string("hashtag_") += id.value();
|
return string("hashtag_") += id.value();
|
||||||
break;
|
break;
|
||||||
|
@ -87,7 +87,7 @@ string MastodonAPI::get_stream_id(const stream_type type,
|
||||||
{
|
{
|
||||||
if (!id)
|
if (!id)
|
||||||
{
|
{
|
||||||
throw runtime_error("No list ID given.");
|
throw runtime_error{"No list ID given."};
|
||||||
}
|
}
|
||||||
return string("list_") += id.value();
|
return string("list_") += id.value();
|
||||||
break;
|
break;
|
||||||
|
|
Reference in New Issue