![]() |
ImageD
v2_7_5 (24.06.22)
ImageD is an image processing software designed for rapid prototyping and implementing algorithms and solutions for science, research and teaching.
|
The D_Error_Handler class takes error codes from D_ERROR_ENUM and shows a popup if an error occures. More...
#include <d_error_handler.h>
Public Member Functions | |
D_Error_Handler () | |
void | ERR (int err, QString sender, QString func, QString detail) |
D_Error_Handler::ERR pops an error message if an error occured and/or streams it to a csv file. More... | |
void | set_Popup_active (bool show_pop) |
void | set_FileStream_active (bool stream_to_file) |
void | set_FileStream_path_csv (QString path) |
D_Error_Handler::set_FileStream_path_csv set the file for error streaming and activates error streaming. File is init with a header. More... | |
The D_Error_Handler class takes error codes from D_ERROR_ENUM and shows a popup if an error occures.
Create an instance of this in your class and call you possibly error code returning functionsin its ::ERR method.
D_Error_Handler::D_Error_Handler | ( | ) |
void D_Error_Handler::ERR | ( | int | err, |
QString | sender, | ||
QString | func, | ||
QString | detail | ||
) |
D_Error_Handler::ERR pops an error message if an error occured and/or streams it to a csv file.
err | error code |
sender | name of sending classs |
func | name of sending function |
detail | some detailed infomation you want to show up / be saved |
do nothing if no error occured
make sure error code is valid
popup
stream
create error string to stream
open stream to file (appending)
check, if file is opened
stream error
stream stashed errors
close stream
if file not open, append error to stashed error list
|
inline |
void D_Error_Handler::set_FileStream_path_csv | ( | QString | path | ) |
D_Error_Handler::set_FileStream_path_csv set the file for error streaming and activates error streaming. File is init with a header.
path | path to stream to. Must end with ".csv" |
check, if file is opened
|
inline |