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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
$FreeBSD$
--- source/gamedlg.cpp 2001/02/17 16:01:39 1.1
+++ source/gamedlg.cpp 2001/02/17 16:06:51
@@ -1233,7 +1233,7 @@
displaymessage("no human players found !", 1 );
delete actmap;
actmap = NULL;
- throw NoMapLoaded();
+ goto except1;
}
} while ( actmap->player[actmap->actplayer].stat != ps_human ); /* enddo */
@@ -1242,26 +1242,29 @@
catch ( InvalidID err ) {
displaymessage( err.getMessage().c_str(), 1 );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
catch ( tinvalidversion err ) {
displaymessage( "File %s has invalid version.\nExpected version %d\nFound version %d\n", 1, err.filename, err.expected, err.found );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
catch ( tfileerror err) {
displaymessage( "error reading map filename %s ", 1, err.filename );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
catch ( ASCexception ) {
displaymessage( "error loading map", 1 );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
removemessage();
+ return;
+except1:
+ throw NoMapLoaded();
}
@@ -1722,7 +1725,7 @@
displaymessage ( "no human players found !", 1 );
delete actmap;
actmap = NULL;
- throw NoMapLoaded();
+ goto except1;
}
if ( human > 1 )
@@ -1743,7 +1746,7 @@
displaymessage("no human players found !", 1 );
delete actmap;
actmap = NULL;
- throw NoMapLoaded();
+ goto except1;
}
} while ( actmap->player[actmap->actplayer].stat != ps_human ); /* enddo */
@@ -1752,25 +1755,29 @@
catch ( InvalidID err ) {
displaymessage( err.getMessage().c_str(), 1 );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
catch ( tinvalidversion err ) {
displaymessage( "File %s has invalid version.\nExpected version %d\nFound version %d\n", 1, err.filename, err.expected, err.found );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
catch ( tfileerror err) {
displaymessage( "error reading map filename %s ", 1, err.filename );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
catch ( ASCexception ) {
displaymessage( "error loading map", 1 );
if ( !actmap || actmap->xsize <= 0)
- throw NoMapLoaded();
+ goto except1;
} /* endcatch */
}
+ return;
+
+except1:
+ throw NoMapLoaded();
}
|