Added global exception handler routine.
This commit is contained in:
parent
99bd8c28ff
commit
4bb7185a0f
@ -30,7 +30,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 2
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 4
|
||||
#define VER_LAMEXP_BUILD 445
|
||||
#define VER_LAMEXP_BUILD 447
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tools versions
|
||||
|
@ -1083,7 +1083,7 @@ void MainWindow::closeButtonClicked(void)
|
||||
void MainWindow::addFilesButtonClicked(void)
|
||||
{
|
||||
ABORT_IF_BUSY;
|
||||
|
||||
|
||||
TEMP_HIDE_DROPBOX
|
||||
(
|
||||
if(lamexp_themes_enabled())
|
||||
|
@ -296,6 +296,16 @@ const QDate &lamexp_version_date(void)
|
||||
return g_lamexp_version_date;
|
||||
}
|
||||
|
||||
/*
|
||||
* Global exception handler
|
||||
*/
|
||||
LONG WINAPI lamexp_exception_handler(__in struct _EXCEPTION_POINTERS *ExceptionInfo)
|
||||
{
|
||||
FatalAppExit(0, L"Unhandeled exception error3, application will exit!");
|
||||
TerminateProcess(GetCurrentProcess(), -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Qt message handler
|
||||
*/
|
||||
|
@ -84,6 +84,7 @@ const char *lamexp_support_url(void);
|
||||
void lamexp_init_console(int argc, char* argv[]);
|
||||
bool lamexp_init_qt(int argc, char* argv[]);
|
||||
int lamexp_init_ipc(void);
|
||||
LONG WINAPI lamexp_exception_handler(__in struct _EXCEPTION_POINTERS *ExceptionInfo);
|
||||
void lamexp_message_handler(QtMsgType type, const char *msg);
|
||||
void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version = 0);
|
||||
bool lamexp_check_tool(const QString &toolName);
|
||||
|
@ -193,13 +193,13 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
int iResult = -1;
|
||||
SetUnhandledExceptionFilter(lamexp_exception_handler);
|
||||
try
|
||||
{
|
||||
int iResult = -1;
|
||||
qInstallMsgHandler(lamexp_message_handler);
|
||||
iResult = lamexp_main(argc, argv);
|
||||
lamexp_finalization();
|
||||
return iResult;
|
||||
}
|
||||
catch(char *error)
|
||||
{
|
||||
@ -225,6 +225,7 @@ int main(int argc, char* argv[])
|
||||
FatalAppExit(0, L"Unhandeled exception error, application will exit!");
|
||||
TerminateProcess(GetCurrentProcess(), -1);
|
||||
}
|
||||
return iResult;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ const AudioFileModel FileAnalyzer::analyzeFile(const QString &filePath)
|
||||
process.setProcessChannelMode(QProcess::MergedChannels);
|
||||
process.setReadChannel(QProcess::StandardOutput);
|
||||
process.start(m_mediaInfoBin, QStringList() << QDir::toNativeSeparators(filePath));
|
||||
|
||||
|
||||
if(!process.waitForStarted())
|
||||
{
|
||||
qWarning("MediaInfo process failed to create!");
|
||||
|
Loading…
Reference in New Issue
Block a user