Kern Sibbald <[EMAIL PROTECTED]> writes: > On Tuesday 16 August 2005 18:37, Martin Simmons wrote: >> >>>>> On Tue, 16 Aug 2005 14:54:59 +0200, Kern Sibbald <[EMAIL PROTECTED]> >> >>>>> said:
[...] >> Jmsg(jcr, M_WARNING, 0, _("Generate VSS snapshots failed. ERR=%s\n"), >> be.strerror()); >> >> what if the _("...") form has to do file operations? > > Just to let you know that in 1.37.36, I have moved the call to GetLastError() > to the berrno constructor. Of course, this shouldn't be necessary if the > code is correct, as it shouldn't generate any errors before the error message > is printed. Just so you know, Windows has a *really* nasty habit of destroying the result of GetLastError in most of the standard functions. You really can't rely on the fact that nothing goes wrong between an error, and the call to that function, preserving the value for you. > In any case, there is now very little chance that the error message > will get lost or modified by subsequent calls. The only safe way to achieve that is to store the result of GetLastError immediately. At least, that was the case for every version of Windows I worked on, I am sorry. Daniel ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users