Shows how to use system_exception exception.
#include <xtd/console>
#include <xtd/guid>
long create_handle() {
return reinterpret_cast<long>(
new guid());
}
void destroy_handle(long handle) {
delete reinterpret_cast<object*>(handle);
}
auto main()->int {
try {
destroy_handle(handle);
console::write_line("Exception occured :");
console::write_line("-------------------");
console::write_line(e);
}
}
Defines the base class for predefined exceptions in the xtd namespace.
Definition system_exception.h:25
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Represents a globally unique identifier (GUID). A GUID is a 128-bit integer (16 bytes) that can be us...
Definition guid.h:23