added: blocks try{} catch(...) to first and second thread

changed: version of the program: 0.9.2 now



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@322 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-09-23 22:52:28 +00:00
parent eb7cec8ecc
commit e87308c721
7 changed files with 45 additions and 25 deletions

View File

@@ -1,24 +1,26 @@
# add "resource.o" to "o" as well
o = resource.o calculation.o convert.o download.o functions.o iniparser.o languages.o mainwindow.o misc.o pad.o parsermanager.o programresources.o tabs.o threadcontroller.o update.o variables.o winmain.o
calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
convert.o: convert.cpp convert.h compileconfig.h bigtypes.h
download.o: download.cpp compileconfig.h download.h
functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
iniparser.o: iniparser.cpp compileconfig.h iniparser.h
languages.o: languages.cpp compileconfig.h languages.h bigtypes.h
mainwindow.o: mainwindow.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h misc.h
misc.o: misc.cpp
pad.o: pad.cpp programresources.h compileconfig.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h pad.h
parsermanager.o: parsermanager.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
programresources.o: programresources.cpp compileconfig.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
threadcontroller.o: threadcontroller.cpp threadcontroller.h stopcalculating.h compileconfig.h
functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
iniparser.o: iniparser.cpp compileconfig.h iniparser.h
languages.o: languages.cpp compileconfig.h languages.h bigtypes.h
mainwindow.o: mainwindow.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h misc.h
misc.o: misc.cpp
pad.o: pad.cpp programresources.h compileconfig.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h pad.h
parsermanager.o: parsermanager.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
programresources.o: programresources.cpp compileconfig.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
threadcontroller.o: threadcontroller.cpp threadcontroller.h stopcalculating.h compileconfig.h
update.o: update.cpp compileconfig.h update.h download.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h messages.h resource.h winmain.h tabs.h pad.h misc.h
variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
winmain.o: winmain.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h
.SUFFIXES: .cpp .o
.cpp.o:

View File

@@ -56,7 +56,7 @@
#define TTCALC_MAJOR_VER 0
#define TTCALC_MINOR_VER 9
#define TTCALC_REVISION_VER 2
#define TTCALC_PRERELEASE_VER 1
#define TTCALC_PRERELEASE_VER 0

View File

@@ -1,19 +1,19 @@
# this file is downloaded from a webserver during checking for an update
[normal]
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.1/ttcalc-0.9.1-setup.exe
filename = ttcalc-0.9.1-setup.exe
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-0.9.2-setup.exe
filename = ttcalc-0.9.2-setup.exe
version.major = 0
version.minor = 9
version.revision = 1
version.revision = 2
version.prerelease = 0
[portable]
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.1/ttcalc-portable-0.9.1-bin.tar.gz
filename = ttcalc-portable-0.9.1-bin.tar.gz
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-portable-0.9.2-bin.tar.gz
filename = ttcalc-portable-0.9.2-bin.tar.gz
version.major = 0
version.minor = 9
version.revision = 1
version.revision = 2
version.prerelease = 0

View File

@@ -594,10 +594,16 @@ unsigned __stdcall UpdateBackgroundProc(void *)
{
using namespace Background;
if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) )
try
{
if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) )
{
HWND main = GetPrgRes()->GetMainWindow();
SendMessage(main, WM_UPDATE_EXISTS, 0, 0);
}
}
catch(...)
{
HWND main = GetPrgRes()->GetMainWindow();
SendMessage(main, WM_UPDATE_EXISTS, 0, 0);
}
_endthreadex(0);

View File

@@ -53,6 +53,8 @@
*/
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
{
try
{
GetPrgRes()->SetInstance(hInstance);
// we're using GetLanguages() simultaneously in two threads, this is to be sure
@@ -112,6 +114,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
DestroyPadWindow();
CloseHandle( (HANDLE)thread_handle );
}
catch(...)
{
ShowError( Languages::unknown_error );
}
return 0;
}