Fixed a compilation error in MapManager.cs when building solution in Release mode.

This commit is contained in:
MaxED 2013-07-26 09:36:32 +00:00
parent b8900b36dd
commit b3713489d3

View file

@ -453,6 +453,7 @@ namespace CodeImp.DoomBuilder {
// Create map data
MapSet newmap = new MapSet();
WAD mapwad;
// Create temp wadfile
string tempfile = General.MakeTempFilename(temppath);
@ -462,8 +463,7 @@ namespace CodeImp.DoomBuilder {
#if DEBUG
tempwad = new WAD(tempfile);
#else
try { tempwad = new WAD(tempfile); }
catch(Exception e)
try { tempwad = new WAD(tempfile); } catch(Exception e)
{
General.ShowErrorMessage("Error while creating a temporary wad file:\n" + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
return false;
@ -472,11 +472,11 @@ namespace CodeImp.DoomBuilder {
// Now open the map file
General.WriteLogLine("Opening source file: " + filepathname);
#if DEBUG
WAD mapwad = new WAD(filepathname, true);
mapwad = new WAD(filepathname, true);
#else
try { mapwad = new WAD(filepathname, true); }
catch(Exception e)
try { mapwad = new WAD(filepathname, true); } catch(Exception e)
{
General.ShowErrorMessage("Error while opening source wad file:\n" + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
return false;
@ -498,8 +498,7 @@ namespace CodeImp.DoomBuilder {
#if DEBUG
newmap = io.Read(newmap, TEMP_MAP_HEADER);
#else
try { newmap = io.Read(newmap, TEMP_MAP_HEADER); }
catch(Exception e)
try { newmap = io.Read(newmap, TEMP_MAP_HEADER); } catch(Exception e)
{
General.ErrorLogger.Add(ErrorType.Error, "Unable to read the map data structures with the specified configuration. " + e.GetType().Name + ": " + e.Message);
General.ShowErrorMessage("Unable to read the map data structures with the specified configuration.", MessageBoxButtons.OK);