Commit a2aedd1
committed
Fixing error reporting in Linux file streams.
For some reason the original implementation was just creating an exception with a hardcoded string error message. This is bad since it looses the underlying error code and doesn't follow the exception type used on other platforms std::system_error.
I updated to check the errno and create a std::system_error exception with the error code included. This results in less OS specific code as well.1 parent e5a9bc4 commit a2aedd1
File tree
2 files changed
+7
-18
lines changed- Release
- src/streams/linux
- tests/Functional/streams
2 files changed
+7
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | 168 | | |
171 | 169 | | |
172 | 170 | | |
| |||
204 | 202 | | |
205 | 203 | | |
206 | 204 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 205 | + | |
213 | 206 | | |
214 | 207 | | |
215 | 208 | | |
| |||
326 | 319 | | |
327 | 320 | | |
328 | 321 | | |
329 | | - | |
330 | | - | |
| 322 | + | |
331 | 323 | | |
332 | 324 | | |
333 | 325 | | |
| |||
383 | 375 | | |
384 | 376 | | |
385 | 377 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 378 | + | |
389 | 379 | | |
390 | 380 | | |
391 | 381 | | |
| |||
437 | 427 | | |
438 | 428 | | |
439 | 429 | | |
440 | | - | |
441 | | - | |
| 430 | + | |
442 | 431 | | |
443 | 432 | | |
444 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
0 commit comments