bes
Updated for version 3.20.13
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
using namespace
libdap
;
50
51
#define THROW(x) throw x(__FILE__,__LINE__)
52
53
// DODS/HDF exceptions class
54
class
dhdferr
:
public
Error
{
55
public
:
56
dhdferr
(
const
string
& msg,
const
string
& file,
int
line);
57
virtual
~dhdferr
()
throw
()
58
{
59
}
60
};
61
62
// Define valid DODS/HDF exceptions
63
class
dhdferr_hcerr
:
public
dhdferr
{
64
public
:
65
dhdferr_hcerr
(
const
string
& msg,
const
string
& file,
int
line);
66
};
// An hdfclass error occured
67
68
class
dhdferr_addattr
:
public
dhdferr
{
69
public
:
70
dhdferr_addattr
(
const
string
& file,
71
int
72
line):
dhdferr
(
string
73
(
"Error occurred while trying to add attribute to DAS"
),
74
file, line) {
75
}};
// AttrTable::append_attr() failed
76
77
class
dhdferr_ddssem
:
public
dhdferr
{
78
public
:
79
dhdferr_ddssem
(
const
string
& file,
80
int
line):
dhdferr
(
string
(
"Problem with DDS semantics"
),
81
file, line) {
82
}};
// DDS::check_semantics() returned false
83
84
class
dhdferr_dassem
:
public
dhdferr
{
85
public
:
86
dhdferr_dassem
(
const
string
& file,
87
int
line):
dhdferr
(
string
(
"Problem with DAS semantics"
),
88
file, line) {
89
}};
// DAS::check_semantics() returned false
90
91
class
dhdferr_ddsout
:
public
dhdferr
{
92
public
:
93
dhdferr_ddsout
(
const
string
& file,
94
int
line):
dhdferr
(
string
(
"Could not write to DDS file"
),
95
file, line) {
96
}};
// error writing to DDS file
97
98
class
dhdferr_dasout
:
public
dhdferr
{
99
public
:
100
dhdferr_dasout
(
const
string
& file,
101
int
line):
dhdferr
(
string
(
"Could not write to DAS file"
),
102
file, line) {
103
}};
// error writing to DAS file
104
105
class
dhdferr_arrcons
:
public
dhdferr
{
106
public
:
107
dhdferr_arrcons
(
const
string
& file,
108
int
109
line):
dhdferr
(
string
110
(
"Error occurred while reading Array constraint"
),
111
file, line) {
112
}};
// constraints read for Array slab did not make sense
113
114
class
dhdferr_datatype
:
public
dhdferr
{
115
public
:
116
dhdferr_datatype
(
const
string
& file,
117
int
118
line):
dhdferr
(
string
119
(
"Data type is not supported by DODS"
),
120
file, line) {
121
}};
// data type is not supported by DODS
122
123
class
dhdferr_consist
:
public
dhdferr
{
124
public
:
125
dhdferr_consist
(
const
string
& file,
126
int
127
line):
dhdferr
(
string
(
"Internal consistency problem"
),
128
file, line) {
129
}};
// something that is not supposed to happen did
130
131
class
dhdferr_hcread
:
public
dhdferr
{
132
public
:
133
dhdferr_hcread
(
const
string
& file,
134
int
line):
dhdferr
(
string
(
"Problem reading HDF data"
),
135
file, line) {
136
}};
// something went wrong when reading using the HDFCLASS library
137
138
class
dhdferr_conv
:
public
dhdferr
{
139
public
:
140
dhdferr_conv
(
const
string
& file,
141
int
142
line):
dhdferr
(
string
143
(
"Problem converting HDF data to DODS"
),
144
file, line) {
145
}};
// something went wrong in a conversion to DAP
146
147
class
dhdferr_fexist
:
public
dhdferr
{
148
public
:
149
dhdferr_fexist
(
const
string
& file,
150
int
151
line):
dhdferr
(
string
152
(
"HDF file does not exist or is unreadable"
),
153
file, line) {
154
}};
// could not stat the input HDF file
155
156
#endif
// _DHDFERR_H
Error
dhdferr_addattr
Definition:
dhdferr.h:68
dhdferr_arrcons
Definition:
dhdferr.h:105
dhdferr_consist
Definition:
dhdferr.h:123
dhdferr_conv
Definition:
dhdferr.h:138
dhdferr_dasout
Definition:
dhdferr.h:98
dhdferr_dassem
Definition:
dhdferr.h:84
dhdferr_datatype
Definition:
dhdferr.h:114
dhdferr_ddsout
Definition:
dhdferr.h:91
dhdferr_ddssem
Definition:
dhdferr.h:77
dhdferr_fexist
Definition:
dhdferr.h:147
dhdferr_hcerr
Definition:
dhdferr.h:63
dhdferr_hcread
Definition:
dhdferr.h:131
dhdferr
Definition:
dhdferr.h:54
libdap
Definition:
BESDapFunctionResponseCache.h:35
modules
hdf4_handler
dhdferr.h
Generated by
1.9.6