OmniSciDB  04ee39c94c
OutOfMemory Class Reference

#include <BufferMgr.h>

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

Public Member Functions

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

Private Member Functions

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

Detailed Description

Definition at line 40 of file BufferMgr.h.

Constructor & Destructor Documentation

◆ OutOfMemory() [1/3]

OutOfMemory::OutOfMemory ( size_t  numBytes)
inline

Definition at line 42 of file BufferMgr.h.

References VLOG.

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

◆ OutOfMemory() [2/3]

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 numBytes=0)
Definition: BufferMgr.h:60
#define VLOG(n)
Definition: Logger.h:277

◆ OutOfMemory() [3/3]

OutOfMemory::OutOfMemory ( const std::string &  err,
size_t  numBytes 
)
inline

Definition at line 53 of file BufferMgr.h.

References VLOG.

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

Member Function Documentation

◆ parse_error_str()

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

Definition at line 60 of file BufferMgr.h.

References to_string().

60  {
61  if (numBytes) {
62  return err + ": Failed to allocate " + std::to_string(numBytes) + " 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: