Classes | Functions
ExceptionDerived_t.cc File Reference
#include "cetlib_except/exception.h"
#include <iostream>
#include <string>

Go to the source code of this file.

Classes

struct  Thing
 

Functions

std::ostream & operator<< (std::ostream &os, const Thing &t)
 
void func3 ()
 
void func2 ()
 
void func1 ()
 
int main ()
 

Function Documentation

void func1 ( )

Test function 1.

Returns
A integer.

Definition at line 30 of file ExceptionDerived_t.cc.

30  {
31  func2();
32 }
33 catch (cet::exception& e) {
34  throw cet::exception("InfiniteLoop", "In func2", e) << "Gave up";
35 }
const double e
void func2()
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
int main ( void  )

Definition at line 38 of file ExceptionDerived_t.cc.

38  {
39  func1();
40 }
41 catch (cet::exception& e) {
42  std::cerr << "*** main caught cet::exception, output is ***\n"
43  << "(" << e.explain_self() << ")"
44  << "*** After exception output ***" << std::endl;
45 
46  std::cerr << "\nCategory name list:\n";
47 }
const double e
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
void func1()
std::ostream& operator<< ( std::ostream &  os,
const Thing t 
)

Definition at line 11 of file ExceptionDerived_t.cc.

12 {
13  os << "Thing(" << t.explain_self() << ")";
14  return os;
15 }