bes
Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
dhdferr.h
1
// This file is part of the hdf4 data handler for the OPeNDAP data server.
2
3
// Copyright (c) 2005 OPeNDAP, Inc.
4
// Author: James Gallagher <jgallagher@opendap.org>
5
//
6
// This is free software; you can redistribute it and/or modify it under the
7
// terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 2.1 of the License, or (at your
9
// option) any later version.
10
//
11
// This software is distributed in the hope that it will be useful, but
12
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
// License for more details.
15
//
16
// You should have received a copy of the GNU Lesser General Public License
17
// along with this software; if not, write to the Free Software Foundation,
18
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
//
20
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
21
23
// Copyright 1996, by the California Institute of Technology.
24
// ALL RIGHTS RESERVED. United States Government Sponsorship
25
// acknowledged. Any commercial use must be negotiated with the
26
// Office of Technology Transfer at the California Institute of
27
// Technology. This software may be subject to U.S. export control
28
// laws and regulations. By accepting this software, the user
29
// agrees to comply with all applicable U.S. export laws and
30
// regulations. User has the responsibility to obtain export
31
// licenses, or other export authority as may be required before
32
// exporting such information to foreign countries or providing
33
// access to foreign persons.
34
35
// Author: Todd Karakashian, NASA/Jet Propulsion Laboratory
36
// Todd.K.Karakashian@jpl.nasa.gov
37
//
39
40
#ifndef _DHDFERR_H
41
#define _DHDFERR_H
42
43
#include <iostream>
44
#include <string>
45
#include <hcerr.h>
46
47
#include <libdap/Error.h>
48
49
50
#define THROW(x) throw x(__FILE__,__LINE__)
51
52
// DODS/HDF exceptions class
53
class
dhdferr:
public
libdap::Error {
54
public
:
55
dhdferr(
const
string
& msg,
const
string
& file,
int
line);
56
~dhdferr()
throw
()
override
=
default
;
57
};
58
59
// Define valid DODS/HDF exceptions
60
class
dhdferr_hcerr:
public
dhdferr {
61
public
:
62
dhdferr_hcerr(
const
string
& msg,
const
string
& file,
int
line);
63
};
// An hdfclass error occured
64
65
class
dhdferr_addattr:
public
dhdferr {
66
public
:
67
dhdferr_addattr(
const
string
& file,
68
int
69
line):dhdferr(
string
70
(
"Error occurred while trying to add attribute to DAS"
),
71
file, line) {
72
}};
// AttrTable::append_attr() failed
73
74
class
dhdferr_ddssem:
public
dhdferr {
75
public
:
76
dhdferr_ddssem(
const
string
& file,
77
int
line):dhdferr(
string
(
"Problem with DDS semantics"
),
78
file, line) {
79
}};
// DDS::check_semantics() returned false
80
81
class
dhdferr_dassem:
public
dhdferr {
82
public
:
83
dhdferr_dassem(
const
string
& file,
84
int
line):dhdferr(
string
(
"Problem with DAS semantics"
),
85
file, line) {
86
}};
// DAS::check_semantics() returned false
87
88
class
dhdferr_ddsout:
public
dhdferr {
89
public
:
90
dhdferr_ddsout(
const
string
& file,
91
int
line):dhdferr(
string
(
"Could not write to DDS file"
),
92
file, line) {
93
}};
// error writing to DDS file
94
95
class
dhdferr_dasout:
public
dhdferr {
96
public
:
97
dhdferr_dasout(
const
string
& file,
98
int
line):dhdferr(
string
(
"Could not write to DAS file"
),
99
file, line) {
100
}};
// error writing to DAS file
101
102
class
dhdferr_arrcons:
public
dhdferr {
103
public
:
104
dhdferr_arrcons(
const
string
& file,
105
int
106
line):dhdferr(
string
107
(
"Error occurred while reading Array constraint"
),
108
file, line) {
109
}};
// constraints read for Array slab did not make sense
110
111
class
dhdferr_datatype:
public
dhdferr {
112
public
:
113
dhdferr_datatype(
const
string
& file,
114
int
115
line):dhdferr(
string
116
(
"Data type is not supported by DODS"
),
117
file, line) {
118
}};
// data type is not supported by DODS
119
120
class
dhdferr_consist:
public
dhdferr {
121
public
:
122
dhdferr_consist(
const
string
& file,
123
int
124
line):dhdferr(
string
(
"Internal consistency problem"
),
125
file, line) {
126
}};
// something that is not supposed to happen did
127
128
class
dhdferr_hcread:
public
dhdferr {
129
public
:
130
dhdferr_hcread(
const
string
& file,
131
int
line):dhdferr(
string
(
"Problem reading HDF data"
),
132
file, line) {
133
}};
// something went wrong when reading using the HDFCLASS library
134
135
class
dhdferr_conv:
public
dhdferr {
136
public
:
137
dhdferr_conv(
const
string
& file,
138
int
139
line):dhdferr(
string
140
(
"Problem converting HDF data to DODS"
),
141
file, line) {
142
}};
// something went wrong in a conversion to DAP
143
144
class
dhdferr_fexist:
public
dhdferr {
145
public
:
146
dhdferr_fexist(
const
string
& file,
147
int
148
line):dhdferr(
string
149
(
"HDF file does not exist or is unreadable"
),
150
file, line) {
151
}};
// could not stat the input HDF file
152
153
#endif
// _DHDFERR_H
modules
hdf4_handler
dhdferr.h
Generated by
1.13.2