Code View

// SPDX-License-Identifier: MIT
#include "lib.hh"

#include <iostream>

int main( )
{
  try
  {
    throw lib::NotFound( "a.so", "no such file" );
  }
  catch ( lib::Base const &e )
  {
    std::cout << e.what( );
  }

  lib::NotFound const e( "b.so", "why", std::locale::classic( ) );
  std::cout << e.missingFilename( ) << ' ' << e.reason( ) << '\n'
            << lib::NotFoundStr( "c.so", "text" );
}