Skip to content

Commit 475a27d

Browse files
committed
Catch std::exception
1 parent 85cc89e commit 475a27d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Database/Database.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "llvm/Support/Path.h"
2626
#include "llvm/Support/raw_ostream.h"
2727
#include "llvm/Support/WindowsError.h"
28+
#include <exception>
2829
#if defined(_WIN32)
2930
#define NOMINMAX
3031
#include "Windows.h"
@@ -290,6 +291,10 @@ Database::Implementation::create(StringRef path, bool readonly, Optional<size_t>
290291
fputs("CP 8.2.2.2.1.5.16\n", stderr);
291292
llvm::raw_string_ostream(error) << "failed opening database: " << err.description();
292293
return nullptr;
294+
} catch (std::exception e) {
295+
fputs("CP 8.2.2.2.1.5.c2.1\n", stderr);
296+
fputs(e.what(), stderr);
297+
fputs("CP 8.2.2.2.1.5.c2.2\n", stderr);
293298
}
294299
}
295300

0 commit comments

Comments
 (0)