OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
build-2.6
stage
include
ost
mol
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
>
24
#include <
ost/mol/module_config.hh
>
25
26
namespace
ost {
namespace
mol {
27
28
struct
DLLEXPORT_OST_MOL
QueryErrorDesc
{
29
QueryErrorDesc
(
const
QueryErrorDesc
& _rhs);
30
31
QueryErrorDesc();
32
33
QueryErrorDesc& operator=(
const
QueryErrorDesc& _rhs);
34
35
String
msg
;
36
Range
range
;
37
};
38
39
class
DLLEXPORT_OST_MOL
QueryError
:
public
ost::Error
{
40
public
:
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
();
55
private
:
56
String
query_;
57
QueryErrorDesc
desc_;
58
};
59
60
}}
//ns
61
#endif
String
std::string String
Definition:
base.hh:54
ost::mol::QueryError
Definition:
query_error.hh:39
ost::mol::QueryErrorDesc::range
Range range
Definition:
query_error.hh:36
module_config.hh
ost::mol::QueryErrorDesc
Definition:
query_error.hh:28
range.hh
DLLEXPORT_OST_MOL
#define DLLEXPORT_OST_MOL
Definition:
module_config.hh:28
ost::Range
Definition:
range.hh:26
ost::Error
Definition:
message.hh:35
message.hh
ost::mol::QueryErrorDesc::msg
String msg
Definition:
query_error.hh:35
Generated by
1.8.5