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.
D_Error_Handler Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ D_Error_Handler()

D_Error_Handler::D_Error_Handler ( )

Member Function Documentation

◆ ERR()

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.

Parameters
errerror code
sendername of sending classs
funcname of sending function
detailsome 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

◆ set_FileStream_active()

void D_Error_Handler::set_FileStream_active ( bool  stream_to_file)
inline

◆ set_FileStream_path_csv()

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.

Parameters
pathpath to stream to. Must end with ".csv"

check, if file is opened

◆ set_Popup_active()

void D_Error_Handler::set_Popup_active ( bool  show_pop)
inline

The documentation for this class was generated from the following files: