feat: pass source_location to exception

This commit is contained in:
ToruNiina
2019-10-31 22:23:31 +09:00
parent 3ca712a8da
commit 41eb1d6887
4 changed files with 32 additions and 24 deletions

View File

@@ -35,7 +35,7 @@ throw_bad_cast(value_t actual, const ::toml::basic_value<C, T, A>& v)
"[error] toml::value bad_cast to ", Expected), {
{std::addressof(get_region(v)),
concat_to_string("the actual type is ", actual)}
}));
}), v.location());
}
// switch by `value_t` and call the corresponding `value::as_xxx()`. {{{