-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexcept.cpp
More file actions
50 lines (44 loc) · 1.32 KB
/
except.cpp
File metadata and controls
50 lines (44 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*******************************************************************
*
* DESCRIPTION: exceptions definition
* class InvalidModelIdException
* class InvalidMessageException
* class MException (base class)
*
* AUTHOR: Amir Barylko & Jorge Beyoglonian
* Version 2: Daniel A. Rodriguez
*
* EMAIL: mailto://amir@dc.uba.ar
* mailto://jbeyoglo@dc.uba.ar
* mailto://drodrigu@dc.uba.ar
*
* DATE: 27/6/1998
* DATE: 27/2/1999 (v2)
*
*******************************************************************/
/** include files **/
#include "except.h"
#include "macroexp.h"
using namespace std;
ostream &MException::print( ostream &out ) const
{
out << "Exception " << this->type() << " thrown!" << endl
<< "Description: " << this->description() << endl ;
if( ! locationList().empty() )
{
out << "Thrown in: " << endl ;
LocationList::const_iterator lcursor ;
for( lcursor = locationList().begin() ; lcursor != locationList().end() ; lcursor++ )
out << "\t" << *lcursor << endl ;
}
if( ! textList().empty() )
{
out << "Description: " << endl ;
TextList::const_iterator tcursor ;
for( tcursor = textList().begin() ; tcursor != textList().end() ; tcursor++ )
out << "\t" << *tcursor << endl ;
}
cout << "Aborting simulation...\n";
delete &(MacroExpansion());
return out;
}