testBacktrace.cpp File Reference

Go to the source code of this file.

Classes

class  foo

Functions

 FENNEL_BEGIN_CPPFILE ("$Id: //open/dev/fennel/common/testBacktrace.cpp#6 $")
 FENNEL_END_CPPFILE ("$Id")
int main (int argc, char **argv)


Function Documentation

FENNEL_BEGIN_CPPFILE ( "$Id: //open/dev/fennel/common/testBacktrace.cpp#6 $"   ) 

FENNEL_END_CPPFILE ( "$Id"   ) 

int main ( int  argc,
char **  argv 
)

Definition at line 78 of file testBacktrace.cpp.

00079 {
00080     if (argc == 1) {
00081         fennel::foo o;
00082         o.f(16);
00083         o.f(2);
00084     } else {
00085         fennel::AutoBacktrace::install();
00086         switch (argv[1][0]) {
00087         case 'a':
00088             assert(false);
00089             std::cerr << "not reached\n";
00090             break;
00091         case 'p':
00092             permAssert(false);
00093             std::cerr << "not reached\n";
00094             break;
00095         case 'e':
00096             std::cerr << "throw new std::runtime_error(\"testing AutoBacktrace\")\n";
00097             throw new std::runtime_error("testing AutoBacktrace");
00098             std::cerr << "not reached\n";
00099             break;
00100         case 's':
00101             {
00102                 fennel::ConfigMap configMap;
00103                 configMap.readParams(*(std::istream *) NULL);
00104             }
00105             break;
00106         default:
00107             ;
00108         }
00109     }
00110     exit(0);
00111 }


Generated on Mon Jun 22 04:00:22 2009 for Fennel by  doxygen 1.5.1