Monday, November 8, 2010

Wide String Shims for std::exception

The latest release of STLSoft (1.9.102) includes wide string additions to the string access shims for std::exception (and derived types). The most obvious and immediate benefit is that code using FastFormat and/or Pantheios in wide string builds can now work seamlessly with exceptions, just as has always been the case in multibyte string builds:

#include <fastformat/ff.hpp>
. . .
#include <pantheios/pan.hpp>
. . . 

int main()
{
. . .
  catch(std::exception& x)
  {
    pan::log_CRITICAL(L"exception: ", x);
    ff::fmtln(std::wcerr, L"program: {0}", x);
  }
. . . 

No comments: