| 36 | } |
| 37 | |
| 38 | std::string BaseException::format(const char * /*id*/, const char *fmt, ...) const noexcept |
| 39 | { |
| 40 | // FIXME -- lookup message string using id as an index. set |
| 41 | // fmt to that string if it exists. |
| 42 | |
| 43 | // format |
| 44 | std::string result; |
| 45 | va_list args; |
| 46 | va_start(args, fmt); |
| 47 | try { |
| 48 | result = deskflow::string::vformat(fmt, args); |
| 49 | } catch (...) { |
| 50 | // ignore |
| 51 | result.clear(); |
| 52 | } |
| 53 | va_end(args); |
| 54 | |
| 55 | return result; |
| 56 | } |