1
/****************************************************************************************
2
* Copyright (c) 2008 Frederick Emmott <mail@fredemmott.co.uk> *
4
* This program is free software; you can redistribute it and/or modify it under *
5
* the terms of the GNU General Public License as published by the Free Software *
6
* Foundation; either version 2 of the License, or (at your option) any later *
9
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
10
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
11
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
13
* You should have received a copy of the GNU General Public License along with *
14
* this program. If not, see <http://www.gnu.org/licenses/>. *
15
****************************************************************************************/
17
#ifndef JSONQT_PARSE_EXCEPTION_H
18
#define JSONQT_PARSE_EXCEPTION_H
20
#include "JsonQtExport.h"
28
/** Parsing exception class.
29
* Raised whenever JsonQt can't pass something it's been given, for
32
class JSONQT_EXPORT ParseException : public std::exception
35
/** Create a ParseException.
36
* @param got is what was found in the string.
37
* @param expected is what the parser was expecting.
38
* @param remaining is what was left of the input.
42
const QString& expected,
43
const QString& remaining
45
~ParseException() throw();
47
/// A single string providing information on the
49
virtual const char* what() const throw();
51
/// What the parser found.
53
/// What the parser was expecting.
55
/// The remaining unparsed input.