So I should be more precise. If there is throwable code in a destructor, it
needs to be handled in the destructor.


On Wed, Mar 12, 2014 at 9:53 AM, Matthew Gidden <gidden@wisc.edu> wrote:

> Here's a Scott Meyers reference as well:
>
> http://bin-login.name/ftp/pub/docs/programming_languages/cpp/cffective_cpp/MEC/MI11_FR.HTM
>
>
> On Wed, Mar 12, 2014 at 9:51 AM, Matthew Gidden <gidden@wisc.edu> wrote:
>
>> e.g.,
>> http://stackoverflow.com/questions/130117/throwing-exceptions-out-of-a-destructor
>>
>> in general, it is considered bad practice to have throwable code in
>> destructors.
>>
>>
>> On Wed, Mar 12, 2014 at 9:10 AM, Anthony Scopatz <
>> notifications@github.com> wrote:
>>
>>> In src/csv_back.cc:
>>>
>>> > @@ -25,6 +25,10 @@
>>> >    fs::create_directory(path);
>>> >  }
>>> >
>>> > +CsvBack::~CsvBack() {
>>> > +  Flush();
>>>
>>> Why do you say that? The destructor is exactly where you need to call
>>> flush.
>>>
>>> --
>>> Reply to this email directly or view it on GitHub<https://github.com/cyclus/cyclus/pull/767/files#r10518404>
>>> .
>>>
>>
>>
>>
>> --
>> Matthew Gidden
>> Ph.D. Candidate, Nuclear Engineering
>> The University of Wisconsin -- Madison
>> Ph. 225.892.3192
>>
>
>
>
> --
> Matthew Gidden
> Ph.D. Candidate, Nuclear Engineering
> The University of Wisconsin -- Madison
> Ph. 225.892.3192
>



-- 
Matthew Gidden
Ph.D. Candidate, Nuclear Engineering
The University of Wisconsin -- Madison
Ph. 225.892.3192