feat: add windows function helper

- add windows function helper namespace for some commonly used windows functions.
- add corresponding testbench for added code.
This commit is contained in:
2024-06-13 11:18:25 +08:00
parent ab12268395
commit 015ff874f8
7 changed files with 178 additions and 21 deletions

View File

@ -6,12 +6,28 @@ namespace YYCC::ExceptionHelper {
/**
* @brief Register unhandled exception handler
* @detail This function frequently called at the start of program.
* @details
* This function will set an internal function as unhandled exception handler on Windows.
* \n
* When unhandled exception raised,
* That internal function will output error stacktrace in standard output
* and log file (located in temp folder), and also generate a dump file
* in temp folder (for convenient debugging of developer when reporting bugs) if it can.
* \n
* This function usually is called at the start of program.
* @remarks This function is Windows only.
*/
void Register();
/**
* @brief Unregiister unhandled exception handler
* @detail This function frequently called at the end of program.
* @brief Unregister unhandled exception handler
* @details
* The reverse operation of Register().
* \n
* This function and Register() should always be used as a pair.
* You must call this function if you have called Register() before.
* \n
* This function usually is called at the end of program.
* @remarks This function is Windows only.
*/
void Unregister();