]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ATO-48, ATO-36, ATO-35 - Test function with argument - to check stackrace functionality
authormivanov <marian.ivanov@cern.ch>
Tue, 3 Jun 2014 06:21:04 +0000 (08:21 +0200)
committermivanov <marian.ivanov@cern.ch>
Tue, 3 Jun 2014 06:21:04 +0000 (08:21 +0200)
STEER/STEERBase/AliLog.cxx
STEER/STEERBase/AliLog.h

index 2e7d85e5cd49c70c8e910d0c8ad0d4834cbff5bf..2af77434b195c2b6367a4c29006b6c40308be511 100644 (file)
@@ -1235,10 +1235,15 @@ void AliLog::MakeCoreDump(const char *fout){
 }
 
 
-void AliLog::TestException(){
+void AliLog::TestException(Int_t level){
   //
   // Dummy function to throw exception
   //
-  throw std::runtime_error("Test exception");
-
+  printf("AliLog::TestException(%d)\n",level);
+  if (level>0){
+    level--;
+    TestException(level);
+  }else{
+    throw std::runtime_error("Test exception");
+  }
 }
index 87ae0223c8ab2b2c96af989a9edc93e7c9f20a36..30a6a0b9c6f96b0c3306ea8950099646b4193c2b 100644 (file)
@@ -109,7 +109,7 @@ class AliLog: public TObject
   static ostream& Stream(EType_t type, UInt_t level,
                          const char* module, const char* className,
                          const char* function, const char* file, Int_t line);
-  static void TestException(); 
+  static void TestException(Int_t level=10); 
  private:
 
                // constructor is made private for implementing a singleton