Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
alloc_failure.hpp
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
21 /*
22  * alloc_failure.hpp
23  *
24  * Created on: 14 Apr 2016
25  * Author: tyrrells
26  */
27 
28 #ifndef SRC_SERVICES_BLAST_INCLUDE_ALLOC_FAILURE_HPP_
29 #define SRC_SERVICES_BLAST_INCLUDE_ALLOC_FAILURE_HPP_
30 
31 #include <new>
32 
34 
35 using namespace std;
36 
46 class AllocFailure : public bad_alloc
47 {
48 public:
54  AllocFailure (const char *error_s);
55 
56  ~AllocFailure () throw ();
57 
63  virtual const char *what () const throw ();
64 
65 private:
66  const char *af_error_s;
67 };
68 
69 
70 #endif /* SRC_SERVICES_BLAST_INCLUDE_ALLOC_FAILURE_HPP_ */
grassroots_util_library.h
AllocFailure
A class used for memory allocation failures.
Definition: alloc_failure.hpp:46