Exception::Exception(ErrorType error_type, const QString &method, const QString &file, int line, Exception *exception, const QString &extra_info) { /* Because the Exception class is not derived from QObject the function tr() is inefficient to translate messages so the translation method is called directly from the application specifying the context (Exception) in the ts file and the text to be translated */ configureException(QApplication::translate("Exception",messages[error_type][ERROR_MESSAGE].toStdString().c_str(),"", -1), error_type, method, file, line, extra_info); if(exception) addException(*exception); }
Exception::Exception(const QString &msg, ErrorType error_type, const QString &method, const QString &file, int line, vector<Exception> &exceptions, const QString &extra_info) { vector<Exception>::iterator itr=exceptions.begin(); configureException(msg,error_type, method, file, line, extra_info); while(itr!=exceptions.end()) { addException((*itr)); itr++; } }
Exception::Exception(const QString &msg, const QString &method, const QString &file, int line, vector<Exception> &exceptions, const QString &extra_info) { vector<Exception>::iterator itr, itr_end; configureException(msg,ERR_CUSTOM, method, file, line, extra_info); itr=exceptions.begin(); itr_end=exceptions.end(); while(itr!=itr_end) { addException((*itr)); itr++; } }
Exception::Exception(ErrorType error_type, const QString &method, const QString &file, int line, vector<Exception> &exceptions, const QString &extra_info) { vector<Exception>::iterator itr, itr_end; /* Because the Exception class is not derived from QObject the function tr() is inefficient to translate messages so the translation method is called directly from the application specifying the context (Exception) in the ts file and the text to be translated */ configureException(QApplication::translate("Exception",messages[error_type][ERROR_MESSAGE].toStdString().c_str(),"",-1), error_type, method, file, line, extra_info); itr=exceptions.begin(); itr_end=exceptions.end(); while(itr!=itr_end) { addException((*itr)); itr++; } }
Exception::Exception(const QString &msg, ErrorType error_type, const QString &method, const QString &file, int line, Exception *exception, const QString &extra_info) { configureException(msg,error_type, method, file, line, extra_info); if(exception) addException(*exception); }
Exception::Exception(const QString &msg, const QString &method, const QString &file, int line, Exception *exception, const QString &extra_info) { configureException(msg,ERR_CUSTOM, method, file, line, extra_info); if(exception) addException(*exception); }
Exception::Exception(void) { configureException("",ERR_CUSTOM,"","",-1,""); }
Exception::Exception(void) { configureException(QString(),ERR_CUSTOM,QString(),QString(),-1,QString()); }