summaryrefslogtreecommitdiff
path: root/plugins/CrashDumper/src/exhndlr.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-11-10 17:48:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-11-10 17:48:31 +0000
commit64e1340acd813704c9e9009b0a4e6fc9a3fb5adf (patch)
treea8a83a6c695ef78ce804340124f45e7aafa7d45a /plugins/CrashDumper/src/exhndlr.cpp
parent972be4fb5cc3c045ae640170421cf5a9dc18ffce (diff)
bkstring removed from CrashDumper
git-svn-id: http://svn.miranda-ng.org/main/trunk@6857 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CrashDumper/src/exhndlr.cpp')
-rw-r--r--plugins/CrashDumper/src/exhndlr.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp
index cf7ceb308d..253ffec924 100644
--- a/plugins/CrashDumper/src/exhndlr.cpp
+++ b/plugins/CrashDumper/src/exhndlr.cpp
@@ -54,20 +54,17 @@ void myfilterWorker(PEXCEPTION_POINTERS exc_ptr, bool notify)
GetLocalTime(&st);
CreateDirectoryTree(CrashLogFolder);
- __try
- {
- if (dtsubfldr)
- {
+ __try {
+ if (dtsubfldr) {
mir_sntprintf(path, MAX_PATH, TEXT("%s\\%02d.%02d.%02d"), CrashLogFolder, st.wYear, st.wMonth, st.wDay);
CreateDirectory(path, NULL);
mir_sntprintf(path, MAX_PATH, TEXT("%s\\%02d.%02d.%02d\\crash%02d%02d%02d%02d%02d%02d.mdmp"), CrashLogFolder,
st.wYear, st.wMonth, st.wDay, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
}
else
- {
mir_sntprintf(path, MAX_PATH, TEXT("%s\\crash%02d%02d%02d%02d%02d%02d.mdmp"), CrashLogFolder,
st.wYear, st.wMonth, st.wDay, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
- }
+
hDumpFile = CreateFile(path, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDumpFile != INVALID_HANDLE_VALUE)
CreateMiniDump(hDumpFile, exc_ptr);
@@ -82,20 +79,17 @@ void myfilterWorker(PEXCEPTION_POINTERS exc_ptr, bool notify)
CloseHandle(hDumpFile);
if (empty) DeleteFile(path);
- __try
- {
- if (dtsubfldr)
- {
+ __try {
+ if (dtsubfldr) {
mir_sntprintf(path, MAX_PATH, TEXT("%s\\%02d.%02d.%02d"), CrashLogFolder, st.wYear, st.wMonth, st.wDay);
CreateDirectory(path, NULL);
mir_sntprintf(path, MAX_PATH, TEXT("%s\\%02d.%02d.%02d\\crash%02d%02d%02d%02d%02d%02d.txt"), CrashLogFolder,
st.wYear, st.wMonth, st.wDay, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
}
else
- {
mir_sntprintf(path, MAX_PATH, TEXT("%s\\crash%02d%02d%02d%02d%02d%02d.txt"), CrashLogFolder,
st.wYear, st.wMonth, st.wDay, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
- }
+
hDumpFile = CreateFile(path, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
mir_sntprintf(path, MAX_PATH, TranslateT("Miranda crashed. Crash report stored in the folder:\n %s\n\n Would you like store it in the clipboard as well?"), CrashLogFolder);
@@ -122,8 +116,7 @@ LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr)
LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr)
{
- if (0xC0000000L <= exc_ptr->ExceptionRecord->ExceptionCode && 0xC0000500L >= exc_ptr->ExceptionRecord->ExceptionCode)
- {
+ if (0xC0000000L <= exc_ptr->ExceptionRecord->ExceptionCode && 0xC0000500L >= exc_ptr->ExceptionRecord->ExceptionCode) {
if (exc_ptr == lastptr) return EXCEPTION_EXECUTE_HANDLER;
lastptr = exc_ptr;
@@ -134,8 +127,7 @@ LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr)
DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info)
{
- if (info != lastptr)
- {
+ if (info != lastptr) {
lastptr = info;
myfilterWorker(info, true);
}