mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Implement fmt::ensure (assert-like with formatted message) + fmt::tie
Arguments should be provided via fmt::tie() due to some limitations. Allow to specify simple message (non-formatting) for plain ::ensure(). Remove redundant function for narrow error.
This commit is contained in:
parent
766cc2d42f
commit
696be6aacd
4 changed files with 76 additions and 17 deletions
|
@ -313,17 +313,10 @@ void fmt_class_string<src_loc>::format(std::string& out, u64 arg)
|
|||
|
||||
namespace fmt
|
||||
{
|
||||
[[noreturn]] void raw_verify_error(const src_loc& loc)
|
||||
[[noreturn]] void raw_verify_error(const src_loc& loc, const char8_t* msg)
|
||||
{
|
||||
std::string out{"Verification failed"};
|
||||
fmt::append(out, "%s", loc);
|
||||
thread_ctrl::emergency_exit(out);
|
||||
}
|
||||
|
||||
[[noreturn]] void raw_narrow_error(const src_loc& loc)
|
||||
{
|
||||
std::string out{"Narrowing error"};
|
||||
fmt::append(out, "%s", loc);
|
||||
std::string out;
|
||||
fmt::append(out, "%s%s", msg ? msg : u8"Verification failed", loc);
|
||||
thread_ctrl::emergency_exit(out);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue