summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-01-22 14:32:00 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-01-23 22:03:15 +0100
commit40d1c7d43a6459aedf1c64a7f5e145ebbe4badcb (patch)
tree72ea3994e177b7bea9ec8c9764fc920f2995383b
parent400b4e4e0ea33ef3d7ad94c503c5e00001dec536 (diff)
downloadNim-40d1c7d43a6459aedf1c64a7f5e145ebbe4badcb.tar.gz
OutOfMemError is never raised so there is no need to check for it (produce less code)
-rw-r--r--lib/system/excpt.nim19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index e9d251bb4..2f41ad1e3 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -347,24 +347,17 @@ proc raiseExceptionAux(e: ref Exception) =
   if globalRaiseHook != nil:
     if not globalRaiseHook(e): return
   when defined(cpp) and not defined(noCppExceptions):
-    if e[] of OutOfMemError:
-      showErrorMessage(e.name)
-      quitOrDebug()
-    else:
-      pushCurrentException(e)
-      raiseCounter.inc
-      if raiseCounter == 0:
-        raiseCounter.inc # skip zero at overflow
-      e.raiseId = raiseCounter
-      {.emit: "`e`->raise();".}
+    pushCurrentException(e)
+    raiseCounter.inc
+    if raiseCounter == 0:
+      raiseCounter.inc # skip zero at overflow
+    e.raiseId = raiseCounter
+    {.emit: "`e`->raise();".}
   else:
     if excHandler != nil:
       if not excHandler.hasRaiseAction or excHandler.raiseAction(e):
         pushCurrentException(e)
         c_longjmp(excHandler.context, 1)
-    elif e[] of OutOfMemError:
-      showErrorMessage(e.name)
-      quitOrDebug()
     else:
       when hasSomeStackTrace:
         var buf = newStringOfCap(2000)
Araq <rumpf_a@web.de> 2011-02-13 21:24:52 +0100 committer Araq <rumpf_a@web.de> 2011-02-13 21:24:52 +0100 REPL improvements' href='/ahoang/Nim/commit/rod/llstream.nim?h=devel&id=55c40746474cff452c09fa9c1244e3d0c7b3ad21'>55c407464 ^
aa8b470cf ^
bf1f4b914 ^
a489161b1 ^
e25474154 ^


a489161b1 ^
2f43fdb83 ^
55c407464 ^
2f43fdb83 ^
e25474154 ^

627e192f6 ^
bf1f4b914 ^
aa8b470cf ^
e25474154 ^

aa8b470cf ^
e25474154 ^



aa8b470cf ^
e25474154 ^



86556ebfd ^
e25474154 ^

86556ebfd ^
aa8b470cf ^

e25474154 ^


bf1f4b914 ^

e25474154 ^


627e192f6 ^
bf1f4b914 ^
e25474154 ^
aa8b470cf ^
e25474154 ^
aa8b470cf ^
2df9b442c ^
aa8b470cf ^
e25474154 ^
55c407464 ^
aa8b470cf ^
55c407464 ^
2df9b442c ^
92cd07be8 ^
a489161b1 ^
c2b58f3a5 ^
92cd07be8 ^
c2b58f3a5 ^
55c407464 ^






aa8b470cf ^
55c407464 ^



a489161b1 ^
55c407464 ^


eae3c305a ^


55c407464 ^
43b6daf2d ^

43940294c ^
43b6daf2d ^




2df9b442c ^
e25474154 ^

a489161b1 ^
43b6daf2d ^
aa8b470cf ^
e25474154 ^

43b6daf2d ^

627e192f6 ^
e25474154 ^
aa8b470cf ^
55c407464 ^
e25474154 ^

aa8b470cf ^
e25474154 ^
aa8b470cf ^
e25474154 ^
aa8b470cf ^
e25474154 ^
aa8b470cf ^
e25474154 ^

aa8b470cf ^
e25474154 ^
aa8b470cf ^
bf1f4b914 ^
aa8b470cf ^
ecd0dea09 ^
a489161b1 ^
e25474154 ^
a489161b1 ^





e25474154 ^
a489161b1 ^


e25474154 ^
a489161b1 ^


e25474154 ^
a489161b1 ^




aa8b470cf ^

e25474154 ^
aa8b470cf ^
2df9b442c ^
aa8b470cf ^
e25474154 ^

aa8b470cf ^
e25474154 ^
aa8b470cf ^

2df9b442c ^

e25474154 ^
aa8b470cf ^
e25474154 ^

aa8b470cf ^
2df9b442c ^
aa8b470cf ^
e25474154 ^

aa8b470cf ^
e25474154 ^


aa8b470cf ^
e25474154 ^
aa8b470cf ^
2df9b442c ^
aa8b470cf ^

92b8fac94 ^


aa8b470cf ^
92b8fac94 ^
aa8b470cf ^


e25474154 ^
e25474154 ^
aa8b470cf ^
e25474154 ^
aa8b470cf ^
e25474154 ^
3e9dcc8be ^
e25474154 ^
aa8b470cf ^
e25474154 ^
2df9b442c ^

aa8b470cf ^
92b8fac94 ^
e25474154 ^

92b8fac94 ^
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216