Merge lp:~jpakkane/libcolumbus/check-temp-file into lp:libcolumbus

Proposed by Jussi Pakkanen
Status: Merged
Approved by: Jussi Pakkanen
Approved revision: 456
Merged at revision: 456
Proposed branch: lp:~jpakkane/libcolumbus/check-temp-file
Merge into: lp:libcolumbus
Diff against target: 15 lines (+5/-0)
1 file modified
src/Trie.cc (+5/-0)
To merge this branch: bzr merge lp:~jpakkane/libcolumbus/check-temp-file
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Unity Team Pending
Review via email: mp+191162@code.launchpad.net

Commit message

Fail early if temporary file can't be created.

Description of the change

Fail early if temporary file can't be created.

To post a comment you must log in.
456. By Jussi Pakkanen

Fail early if temporary file can't be created.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Trie.cc'
--- src/Trie.cc 2013-01-31 10:23:45 +0000
+++ src/Trie.cc 2013-10-15 12:04:28 +0000
@@ -74,6 +74,11 @@
74Trie::Trie() {74Trie::Trie() {
75 p = new TriePrivate();75 p = new TriePrivate();
76 p->f = tmpfile();76 p->f = tmpfile();
77 if(!p->f) {
78 string msg("Could not create temporary file: ");
79 msg += strerror(errno);
80 throw runtime_error(msg);
81 }
77 p->map = nullptr;82 p->map = nullptr;
78 expand();83 expand();
79 p->h->firstFree = sizeof(TrieHeader);84 p->h->firstFree = sizeof(TrieHeader);

Subscribers

People subscribed via source and target branches

to all changes: