Public Member Functions | Private Attributes | List of all members
daqchannelmap::ChannelMapException Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-30/DAQChannelMap/cxx/include/ChannelMapExceptionOLD.h"

Inheritance diagram for daqchannelmap::ChannelMapException:

Public Member Functions

 ChannelMapException (const std::string &fileName, int line, const std::string &message)
 
virtual ~ChannelMapException () throw ()
 
const char * what () const throw ()
 

Private Attributes

std::string _fullText
 

Detailed Description

Class to report exceptions in the DAQChannel Map package.

Author
A.Norman (based off K.Biery Template)
Version
Revision
1.1.12.1
Date
2019/09/27 00:06:47

Definition at line 22 of file ChannelMapExceptionOLD.h.

Constructor & Destructor Documentation

daqchannelmap::ChannelMapException::ChannelMapException ( const std::string fileName,
int  line,
const std::string message 
)
inline

Constructs a data format exception instance from the specified file, line number, and message.

Definition at line 30 of file ChannelMapExceptionOLD.h.

References _fullText, allTimeWatchdog::endl, compare_h5_caf::idx, make_syst_table_plots::line, gen_flatrecord::size, and string.

31  {
32 
33  // convert the line number to a string
34  std::stringstream tmpStream;
35  tmpStream << line;
36  std::string lineNumber = tmpStream.str();
37 
38  // build up the exception text
39  _fullText = "DAQChannelMap - Error: " + message + " at " + fileName + ":" + lineNumber;
40 
41  // add some limited stack trace information
42  void *array[10];
43  size_t size;
44  char **strings;
45  size_t idx;
46 
47  size = backtrace (array, 10);
48  strings = backtrace_symbols (array, size);
49  tmpStream.seekp(0); // clear out the stream
50  for (idx = 0; idx < size; idx++) {
51  tmpStream << " " << strings[idx] << std::endl;
52  }
53  free (strings);
54 
55  _fullText += "\n Stack trace:\n" + tmpStream.str();
56  }
fileName
Definition: plotROC.py:78
enum BeamMode string
virtual daqchannelmap::ChannelMapException::~ChannelMapException ( )
throw (
)
inlinevirtual

Destructor.

Definition at line 61 of file ChannelMapExceptionOLD.h.

61  {
62  return;
63  }

Member Function Documentation

const char* daqchannelmap::ChannelMapException::what ( ) const
throw (
)
inline

Returns a description of the exception.

Definition at line 68 of file ChannelMapExceptionOLD.h.

References _fullText.

68  {
69  return _fullText.c_str();
70  }

Member Data Documentation

std::string daqchannelmap::ChannelMapException::_fullText
private

The full description of the exception.

Definition at line 77 of file ChannelMapExceptionOLD.h.

Referenced by ChannelMapException(), and what().


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