IODA Bundle
Exceptions.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2018 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #include "odc/core/Exceptions.h"
12 
13 
14 namespace odc {
15 namespace core {
16 
17 //----------------------------------------------------------------------------------------------------------------------
18 
19 ODBDecodeError::ODBDecodeError(const std::string& s, const eckit::CodeLocation& loc) :
20  Exception(std::string("ODB decode failure: ") + s, loc) {}
21 
22 
23 ODBIncomplete::ODBIncomplete(const std::string& s, const eckit::CodeLocation& loc) :
24  ODBDecodeError(std::string("Unexpected end of file: ") + s, loc) {}
25 
26 
27 ODBInvalid::ODBInvalid(const std::string& file, const std::string& reason, const eckit::CodeLocation&) :
28  ODBDecodeError(std::string("Invalid ODB (") + file + ") -- " + reason, Here()) {}
29 
30 
31 ODBEndOfDataStream::ODBEndOfDataStream(const std::string& s, const eckit::CodeLocation& loc) :
32  ODBDecodeError(s, loc) {}
33 
34 //----------------------------------------------------------------------------------------------------------------------
35 
36 } // namespace core
37 } // namespace odc
ODBDecodeError(const std::string &, const eckit::CodeLocation &)
Definition: Exceptions.cc:19
ODBEndOfDataStream(const std::string &, const eckit::CodeLocation &)
Definition: Exceptions.cc:31
ODBIncomplete(const std::string &, const eckit::CodeLocation &)
Definition: Exceptions.cc:23
ODBInvalid(const std::string &title, const std::string &reason, const eckit::CodeLocation &)
Definition: Exceptions.cc:27
Definition: ColumnInfo.h:23
Definition: encode.cc:30