4#ifndef DEFECT_NO_EXCEPTIONS
5 #define DEFECT_NO_EXCEPTIONS 1
9#include "CLHEP/Exceptions/ZMthrow.h"
10#include "CLHEP/Exceptions/ZMexception.h"
11#include "CLHEP/Exceptions/ZMexAction.h"
12#include "CLHEP/Exceptions/ZMexClassInfo.h"
13#include "CLHEP/Exceptions/ZMexSeverity.h"
14#include "CLHEP/Exceptions/ZMerrno.h"
29#define exit( x ) printf( "this is an actual exit\n", x );
30#define abort( ) printf( "this is an actual abort\n" );
37ZMexClassInfo ZMxHepTuple::_classInfo(
"ZMxHeptuple",
"HepTuple" );
40ZMexClassInfo ZMxTop2::_classInfo(
"ZMxTop2",
"Other Top Exception" );
43ZMexClassInfo ZMxHepTuple2::_classInfo(
"ZMxHepTuple2",
"Other HepTuple" );
46ZMexClassInfo ZMxColumn::_classInfo(
"ZMxColumn",
"Column excep" );
54 printf(
"Try to ignore a ZMxTop with msg -top-\n" );
56 printf(
"Try to throw a ZMxHepTuple with msg -bottom-\n" );
57 ZMthrow( ZMxHepTuple(
"bottom" ) );
59 printf(
"Try to throw a top exception with a ZMhParentHandler\n" );
62 printf(
"Try to throw a ZMxColumn\n" );
63 ZMthrow( ZMxColumn(
"a column error" ) );
67 std::ofstream logfile(
"exception.report" );
70 printf(
"Try to throw a ZMxTop2\n" );
73 printf(
"Try to ignore a ZMxHepTuple2\n" );
74 ZMthrow( ZMxHepTuple2(
"a heptuple error" ) );
77 printf(
"Try to ignore a ZMxColumn\n" );
78 ZMthrow( ZMxColumn(
"2 column error" ) );
79 printf(
"Try to ignore a ZMxColumn\n" );
80 ZMthrow( ZMxColumn(
"3 column error" ) );
81 printf(
"Try to throw a ZMxColumn\n" );
82 ZMthrow( ZMxColumn(
"4 column error" ) );
83 printf(
"Try to throw a ZMxColumn\n" );
84 ZMthrow( ZMxColumn(
"5 column error" ) );
86 std::cout <<
"logged the following exceptions\n";
92 std::cout <<
"Reset the length of ZMerrno to 4\n";
#define ZMexStandardDefinition(Parent, Class)
#define ZMthrow(userExcept)
unsigned int setMax(unsigned int limit)
unsigned int size() const
const ZMexception * get(unsigned int k=0) const
std::string message() const
virtual std::string name() const