Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
parseexception.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19#ifndef JELLYFIN_SUPPORT_PARSEEXCEPTION_H
20#define JELLYFIN_SUPPORT_PARSEEXCEPTION_H
21
22#include <QException>
23#include <QString>
24
25namespace Jellyfin {
26namespace Support {
27
31class ParseException : public QException {
32public:
33 explicit ParseException(const QString &message)
34 : m_message(message.toStdString()) {}
35
36 /*explicit ParseException(const ParseException &other)
37 : m_message(other.m_message) {}*/
38
39 virtual const char *what() const noexcept override;
40
41 virtual QException *clone() const override;
42 virtual void raise() const override;
43private:
44 std::string m_message;
45};
46
47} // NS Support
48} // NS Jellyfin
49
50#endif // JELLYFIN_SUPPORT_PARSEEXCEPTION_H
Thrown when JSON cannot be parsed.
Definition parseexception.h:31
virtual QException * clone() const override
Definition parseexception.cpp:29
virtual void raise() const override
Definition parseexception.cpp:33
ParseException(const QString &message)
Definition parseexception.h:33
virtual const char * what() const noexcept override
Definition parseexception.cpp:25