test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DQMError.cc File Reference
#include "DQMServices/Core/src/DQMError.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void raiseDQMError (const char *context, const char *fmt,...)
 

Function Documentation

void raiseDQMError ( const char *  context,
const char *  fmt,
  ... 
)

Definition at line 11 of file DQMError.cc.

References createfilelist::args, and python.rootplot.argparse::message.

Referenced by MonitorElement::accessRootObject(), DQMHistNormalizer::buildRegex(), DQMStore::cd(), DQMStore::cdInto(), checkRootObject(), MonitorElement::copyFunctions(), DQMStore::createQTest(), DQMOldReceiver::doMonitoring(), fastmatch::fastmatch(), DQMStore::findObject(), DQMStore::get_info(), MonitorElement::getAxis(), DQMStore::getMatchingContents(), MonitorElement::incompatible(), MonitorElement::initialise(), DQMStore::makeDirectory(), DQMStore::readDirectory(), DQMStore::readFile(), DQMStore::readFilePB(), QCriterion::runTest(), DQMStore::save(), DQMNet::startLocalServer(), DQMStore::tag(), DQMOldReceiver::update(), DQMStore::useQTest(), and DQMStore::useQTestByMatch().

12 {
13  va_list args;
14  char *message = 0;
15 
16  va_start(args, fmt);
17  vasprintf(&message, fmt, args);
18  va_end(args);
19 
20 #if WITHOUT_CMS_FRAMEWORK
21  char *final = 0;
22  asprintf(&final, "%s: %s", context, message ? message : FAILED);
23  std::runtime_error err(final ? final : FAILED);
24  free(final);
25 #else
26  cms::Exception err(context);
27  if (message)
28  err << message;
29 #endif
30 
31  free(message);
32  throw err;
33 }
static const char * fmt
Definition: Version.cc:9