Stack Trace code snippet
by Kenneth Holst · in Torque X 3D · 11/07/2006 (12:28 pm) · 0 replies
You can paste this code over the body of the main function in Main.cs in TankBuster and do a release build- if you get a crash, it should drop a file called "TorqueCrashException.txt" in the tankbuster\bin\x86\release\ folder.
------------------------------------------------------------------------------
{
#if !DEBUG && !TRACE
try
{
#endif
GarageGames.Torque.Examples.TankBuster.Game game = new Torque.Examples.TankBuster.Game();
game.Run();
#if !DEBUG && !TRACE
}
catch (Exception e)
{
System.IO.StreamWriter sw = new System.IO.StreamWriter("torqueCrashException.txt");
sw.WriteLine(e.ToString());
sw.Dispose();
throw new Exception("An exception occured in Torque, check torqueCrashException.txt for details", e);
}
#endif
}
--------------------------------------------------------------------------------
------------------------------------------------------------------------------
{
#if !DEBUG && !TRACE
try
{
#endif
GarageGames.Torque.Examples.TankBuster.Game game = new Torque.Examples.TankBuster.Game();
game.Run();
#if !DEBUG && !TRACE
}
catch (Exception e)
{
System.IO.StreamWriter sw = new System.IO.StreamWriter("torqueCrashException.txt");
sw.WriteLine(e.ToString());
sw.Dispose();
throw new Exception("An exception occured in Torque, check torqueCrashException.txt for details", e);
}
#endif
}
--------------------------------------------------------------------------------