Finally got rid of truncation errors

This commit is contained in:
andreja6
2019-11-03 23:46:43 -08:00
parent 7898df7a8e
commit 476610fe06
2 changed files with 140 additions and 133 deletions

View File

@@ -41,6 +41,10 @@
#include "IEBrowser.h"
#include "PropertyWindow.h"
#include <commctrl.h>
#include <exception>
#include <fstream>
#include <string>
#include <iostream>
#if G3D_VER < 61000
#error Requires G3D 6.10
@@ -1787,9 +1791,12 @@ int main(int argc, char** argv) {
Demo demo = Demo(settings,hwndMain);
demo.run();
}
catch(...)
catch(std::exception w)
{
//TODO Figure how to save the error to file
std::ofstream out("C:\\Dynamica\\error.txt");
out << w.what();
out.close();
OnError(-1);
}
return 0;