OpenStructure
Loading...
Searching...
No Matches
query_error.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// This file is part of the OpenStructure project <www.openstructure.org>
3//
4// Copyright (C) 2008-2020 by the OpenStructure authors
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License as published by the Free
8// Software Foundation; either version 3.0 of the License, or (at your option)
9// any later version.
10// This library is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this library; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18//------------------------------------------------------------------------------
19#ifndef OST_QUERY_ERROR_HH
20#define OST_QUERY_ERROR_HH
21
22#include <ost/message.hh>
23#include <ost/range.hh>
25
26namespace ost { namespace mol {
27
38
40public:
41 QueryError(const String& query, const QueryErrorDesc& desc) throw();
42
43 ~QueryError() throw();
44
46 const String& GetMessage()const throw();
47
48 // Get range of where the error occurred
49 const Range& GetRange() const;
50
52 String GetFormattedMessage() const throw();
54 const String& GetQueryString() const throw();
55private:
56 String query_;
57 QueryErrorDesc desc_;
58};
59
60}} //ns
61#endif
QueryError(const String &query, const QueryErrorDesc &desc)
std::string String
Definition base.hh:54
#define DLLEXPORT_OST_MOL
Definition base.dox:1
QueryErrorDesc(const QueryErrorDesc &_rhs)
QueryErrorDesc & operator=(const QueryErrorDesc &_rhs)