#include <Varargs.h> // platform independent definition of va_copy
#include "AliLog.h"
+// STD
+#include <iostream>
+#include <algorithm>
+#include <sstream>
+#include <stdexcept>
+#include <functional>
+
+
using std::endl;
using std::cout;
void AliLog::EnableCoreDump(Bool_t enabled)
{
// enable or disable debug output
-
+ gSystem->Exec("ulimit -c unlimited");
fgCoreEnabled = enabled;
gSystem->ResetSignal(kSigFloatingException,enabled);
gSystem->ResetSignal(kSigSegmentationViolation,enabled);
-
-
+ if (enabled) {
+ printf("Core dump enabled\n");
+ }
+ else {
+ printf("Core dump disabled\n");
+ }
}
gSystem->Exec(Form("gcore %d", gSystem->GetPid()));
}
}
+
+
+void AliLog::TestException(Int_t level){
+ //
+ // Dummy function to throw exception
+ //
+ printf("AliLog::TestException(%d)\n",level);
+ if (level>0){
+ level--;
+ TestException(level);
+ }else{
+ throw std::runtime_error("Test exception");
+ }
+}