Changeset 81c6e32180ba6f1018c28ae75b7281fd38121812
- Timestamp:
- 09/10/10 22:34:43 (21 months ago)
- Author:
- Antti-Juhani Kaijanaho <antti-juhani@…>
- Children:
- 99057e4d73dbb905f06f5ccc4ea49708b8aaa0a8
- Parents:
- c53e53f1cb0d542e5c931555a591d2589c033006
- git-committer:
- Antti-Juhani Kaijanaho <antti-juhani@…> (09/10/10 22:34:43)
- Message:
-
Exception-proof destructors.
Hopefully addresses #78.
Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@…>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r868b365
|
r81c6e32
|
|
| 1 | 1 | /* This file is part of Alue, the multiprotocol Internet discussion daemon |
| 2 | 2 | |
| 3 | | Copyright © 2009 Antti-Juhani Kaijanaho |
| | 3 | Copyright © 2009, 2010 Antti-Juhani Kaijanaho |
| 4 | 4 | |
| 5 | 5 | Alue is free software: you can redistribute it and/or modify it |
| … |
… |
|
| 39 | 39 | : valid(false) |
| 40 | 40 | { if (doOpen) open(); } |
| 41 | | ~logline() { if (valid) close(); } |
| | 41 | ~logline() { |
| | 42 | try |
| | 43 | { |
| | 44 | if (valid) close(); |
| | 45 | } |
| | 46 | catch (std::exception) |
| | 47 | {} |
| | 48 | } |
| 42 | 49 | |
| 43 | 50 | void open(); |
-
|
r67c3cdb
|
r81c6e32
|
|
| 578 | 578 | connection::~connection() |
| 579 | 579 | { |
| 580 | | logger::logline ll; |
| 581 | | ll << loghead << "dying"; |
| 582 | | ll.close(); |
| | 580 | try |
| | 581 | { |
| | 582 | logger::logline ll; |
| | 583 | ll << loghead << "dying"; |
| | 584 | ll.close(); |
| | 585 | } catch (std::exception) |
| | 586 | {} |
| 583 | 587 | } |
| 584 | 588 | |
-
|
r08f5bd7
|
r81c6e32
|
|
| 256 | 256 | {} |
| 257 | 257 | |
| 258 | | ~session() { impl->kill(); } |
| | 258 | ~session() { |
| | 259 | try |
| | 260 | { |
| | 261 | impl->kill(); |
| | 262 | } |
| | 263 | catch (std::exception) |
| | 264 | {} |
| | 265 | } |
| 259 | 266 | |
| 260 | 267 | void kill() { impl->kill(); } |