mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
Unify custom exceptions
This commit is contained in:
@@ -31,11 +31,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
#include "base/exceptions.h"
|
||||
|
||||
class QProcessEnvironment;
|
||||
|
||||
struct QBtCommandLineParameters
|
||||
@@ -67,14 +68,10 @@ struct QBtCommandLineParameters
|
||||
QStringList paramList() const;
|
||||
};
|
||||
|
||||
class CommandLineParameterError : public std::runtime_error
|
||||
class CommandLineParameterError : public RuntimeError
|
||||
{
|
||||
public:
|
||||
explicit CommandLineParameterError(const QString &messageForUser);
|
||||
const QString &messageForUser() const;
|
||||
|
||||
private:
|
||||
const QString m_messageForUser;
|
||||
using RuntimeError::RuntimeError;
|
||||
};
|
||||
|
||||
QBtCommandLineParameters parseCommandLine(const QStringList &args);
|
||||
|
||||
Reference in New Issue
Block a user