mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Unify custom exceptions
This commit is contained in:
parent
89cedd411e
commit
9565b695ef
13 changed files with 43 additions and 57 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue