summaryrefslogtreecommitdiffstats
path: root/depends/util
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-28 21:50:58 +0100
committerPetr Mrázek <peterix@gmail.com>2013-10-28 21:50:58 +0100
commit7df667f823fc4a679148dfea215b25642babb48f (patch)
treeb992f3180b2703e3fcdae440f0236dbc5f2d9d64 /depends/util
parent6ecb833dbf4c4930c8354dcce7967ad44c16c217 (diff)
downloadMultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.gz
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.lz
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.xz
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.zip
Valgrind-checked early application start
Diffstat (limited to 'depends/util')
-rw-r--r--depends/util/include/cmdutils.h8
-rw-r--r--depends/util/src/cmdutils.cpp15
2 files changed, 2 insertions, 21 deletions
diff --git a/depends/util/include/cmdutils.h b/depends/util/include/cmdutils.h
index 93fef9ff..b8582195 100644
--- a/depends/util/include/cmdutils.h
+++ b/depends/util/include/cmdutils.h
@@ -83,16 +83,10 @@ enum Enum
/**
* @brief The ParsingError class
*/
-class LIBUTIL_EXPORT ParsingError : public std::exception
+class LIBUTIL_EXPORT ParsingError : public std::runtime_error
{
public:
ParsingError(const QString &what);
- ParsingError(const ParsingError &e);
- ~ParsingError() throw() {}
- const char *what() const throw();
- QString qwhat() const;
-private:
- QString m_what;
};
/**
diff --git a/depends/util/src/cmdutils.cpp b/depends/util/src/cmdutils.cpp
index 80ba719d..b9cab717 100644
--- a/depends/util/src/cmdutils.cpp
+++ b/depends/util/src/cmdutils.cpp
@@ -463,21 +463,8 @@ void Parser::getPrefix(QString &opt, QString &flag)
// ParsingError
ParsingError::ParsingError(const QString &what)
+:std::runtime_error(what.toStdString())
{
- m_what = what;
-}
-ParsingError::ParsingError(const ParsingError &e)
-{
- m_what = e.m_what;
-}
-
-const char *ParsingError::what() const throw()
-{
- return m_what.toLocal8Bit().constData();
-}
-QString ParsingError::qwhat() const
-{
- return m_what;
}
}