Show how to use format xtd::format class with exceptions.
#include <xtd/system_exception>
#include <xtd/argument_out_of_range_exception>
#include <xtd/ustring>
using namespace std;
auto main()->int {
cout << ustring::format("{}", exception()) << endl;
cout << ustring::format("{}", invalid_argument("Invalid argument")) << endl;
}
The exception that is thrown when one of the arguments provided to a method is out of range.
Definition argument_out_of_range_exception.h:20
Defines the base class for predefined exceptions in the xtd namespace.
Definition system_exception.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10