OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OutOfMemory Class Reference

#include <BufferMgr.h>

+ Inheritance diagram for OutOfMemory:
+ Collaboration diagram for OutOfMemory:

Public Member Functions

 OutOfMemory (size_t num_bytes)
 
 OutOfMemory (const std::string &err)
 
 OutOfMemory (const std::string &err, size_t num_bytes)
 

Private Member Functions

std::string parse_error_str (const std::string &err, const size_t num_bytes=0)
 

Detailed Description

Definition at line 40 of file BufferMgr.h.

Constructor & Destructor Documentation

OutOfMemory::OutOfMemory ( size_t  num_bytes)
inline

Definition at line 42 of file BufferMgr.h.

References VLOG.

43  : std::runtime_error(parse_error_str("OutOfMemory", num_bytes)) {
44  VLOG(1) << "Failed to allocate " << num_bytes << " bytes";
45  VLOG(1) << boost::stacktrace::stacktrace();
46  };
std::string parse_error_str(const std::string &err, const size_t num_bytes=0)
Definition: BufferMgr.h:60
#define VLOG(n)
Definition: Logger.h:300
OutOfMemory::OutOfMemory ( const std::string &  err)
inline

Definition at line 48 of file BufferMgr.h.

References VLOG.

48  : std::runtime_error(parse_error_str(err, 0)) {
49  VLOG(1) << "Failed with OutOfMemory, condition " << err;
50  VLOG(1) << boost::stacktrace::stacktrace();
51  };
std::string parse_error_str(const std::string &err, const size_t num_bytes=0)
Definition: BufferMgr.h:60
#define VLOG(n)
Definition: Logger.h:300
OutOfMemory::OutOfMemory ( const std::string &  err,
size_t  num_bytes 
)
inline

Definition at line 53 of file BufferMgr.h.

References VLOG.

54  : std::runtime_error(parse_error_str(err, num_bytes)) {
55  VLOG(1) << "Failed to allocate " << num_bytes << " bytes with condition " << err;
56  VLOG(1) << boost::stacktrace::stacktrace();
57  };
std::string parse_error_str(const std::string &err, const size_t num_bytes=0)
Definition: BufferMgr.h:60
#define VLOG(n)
Definition: Logger.h:300

Member Function Documentation

std::string OutOfMemory::parse_error_str ( const std::string &  err,
const size_t  num_bytes = 0 
)
inlineprivate

Definition at line 60 of file BufferMgr.h.

References to_string().

60  {
61  if (num_bytes) {
62  return err + ": Failed to allocate " + std::to_string(num_bytes) + " bytes";
63  } else {
64  return "Failed to allocate memory with condition " + err;
65  }
66  }
std::string to_string(char const *&&v)

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: