Commit d777bbc9 authored by Langella Olivier's avatar Langella Olivier
Browse files

mcqError is now derived from pappso exception

parent ab082f8e
......@@ -13,6 +13,7 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <pappsomspp/msfile/msfileaccessor.h>
#include <QSettings>
MsrunSelectionWidget::MsrunSelectionWidget(QWidget *parent)
: MasschroQWidget(parent)
......
......@@ -17,81 +17,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef MCQERROR_H_
#define MCQERROR_H_ 1
#pragma once
#include <QString>
#include <QtConcurrent>
#include <QException>
#include <string>
#include <pappsomspp/pappsoexception.h>
class mcqError : public QException
class mcqError : public pappso::PappsoException
{
public:
mcqError(QString message) throw()
mcqError(const QString &message) throw() : pappso::PappsoException(message)
{
_message = message;
}
mcqError(const mcqError &other) throw()
{
_message = other._message;
}
void
raise() const override
{
throw *this;
}
virtual QException *
clone() const override
{
return new mcqError(*this);
}
/*mcqError(std::string message = "") throw () :
_message(message.c_str()) {
}*/
virtual const QString &
qwhat() const throw()
{
return _message;
}
virtual ~mcqError() throw()
{
}
private:
QString _message; // Description de l'erreur
};
class McqErrorConcurrent : public QtConcurrent::Exception
{
public:
McqErrorConcurrent(const QString &err) : e(err)
{
}
McqErrorConcurrent(mcqError &err) : e(err)
{
}
void
raise() const
{
throw *this;
}
McqErrorConcurrent *
clone() const
{
return new McqErrorConcurrent(*this);
}
mcqError
error() const
{
return e;
}
private:
mcqError e;
};
#endif /*MCQERROR_H_*/
......@@ -574,15 +574,6 @@ Msrun::readPrecursorsAndRetentionTimesInMzDataFile(const bool read_time,
mcqerr() << errorp.qwhat().toStdString().c_str() << endl;
return (false);
}
catch(mcqError &errorException)
{
throw mcqError(QObject::tr("error reading xml input file '%1' :\n%2")
.arg(xml_file.absoluteFilePath())
.arg(errorException.what()));
mcqerr() << "error reading msrun xml input file " << endl;
mcqerr() << errorException.what() << endl;
}
mcqout() << QObject::tr("MS run '%1' : xml file '%2' : parsing OK")
.arg(mcsp_msrunId->getXmlId())
......
......@@ -111,7 +111,7 @@ MapQuanti::operator()(QuantiItemBase *p_currentSearchItem)
if(msrun_xic_sp == nullptr)
{
qDebug() _;
qDebug();
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment