netpanzer-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netPanzer-CVS] netpanzer/src ChangeLog Lib/cGrowList.hpp Lib/c...


From: Matthias Braun
Subject: [netPanzer-CVS] netpanzer/src ChangeLog Lib/cGrowList.hpp Lib/c...
Date: Sun, 07 Sep 2003 16:49:04 -0400

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Matthias Braun <address@hidden> 03/09/07 16:49:03

Modified files:
        src            : ChangeLog 
        src/Lib        : cGrowList.hpp codewiz.hpp 
        src/Lib/2D     : ColorTable.cpp DigitText.cpp PackedSurface.cpp 
                         Palette.cpp Surface.cpp 
        src/Lib/Interfaces: UtilInterface.cpp 
        src/Lib/Particles: CloudParticle2D.cpp FireParticle2D.cpp 
                           FlameParticle2D.cpp FlashParticle2D.cpp 
                           Particle2D.cpp PuffParticle2D.cpp 
        src/Lib/View   : Component.cpp Desktop.cpp String.cpp String.hpp 
                         View.cpp cButton.cpp cInputField.cpp 
        src/NetPanzer/Classes: SpriteSorter.cpp 
        src/NetPanzer/Classes/Weapons: Weapon.cpp 
        src/NetPanzer/Interfaces: Stats.cpp 
        src/NetPanzer/Views/Game: ChatView.cpp HelpScrollView.cpp 
                                  LobbyView.cpp ProgressView.cpp 
                                  RankView.cpp VehicleSelectionView.cpp 
                                  _MiniMapView.cpp 
        src/NetPanzer/Views/MainMenu: MenuTemplateView.cpp 
                                      SpecialButtonView.cpp 
        src/NetPanzer/Views/MainMenu/Multi: FlagSelectionView.cpp 
                                            HostJoinTemplateView.cpp 
                                            MapSelectionView.cpp 
                                            MultiMapSelectorView.cpp 
                                            MultiVehicleSelectorView.cpp 
Removed files:
        src/Lib        : terminate.cpp 

Log message:
        -replaced all FUBARs with throw Exception, so I could remove 
terminate.cpp

Patches:
Index: netpanzer/src/ChangeLog
diff -u netpanzer/src/ChangeLog:1.8 netpanzer/src/ChangeLog:1.9
--- netpanzer/src/ChangeLog:1.8 Sun Sep  7 14:39:32 2003
+++ netpanzer/src/ChangeLog     Sun Sep  7 16:49:02 2003
@@ -6,6 +6,7 @@
  and clean network code will be needed sometime anyway...)
 -more cleanup in the network code
 -added a client version of the SDLNet code
+-replaced all FUBARs with throw Exception, so I could remove terminate.cpp
 
 6-Sep-2003 by Matze Braun
 -added a unix implementation of _findfirst, _findnext and _findclose
Index: netpanzer/src/Lib/2D/ColorTable.cpp
diff -u netpanzer/src/Lib/2D/ColorTable.cpp:1.7 
netpanzer/src/Lib/2D/ColorTable.cpp:1.8
--- netpanzer/src/Lib/2D/ColorTable.cpp:1.7     Sat Sep  6 16:49:45 2003
+++ netpanzer/src/Lib/2D/ColorTable.cpp Sun Sep  7 16:49:02 2003
@@ -70,7 +70,8 @@
        int numBytes = sizeof(PIX) * colorCount;
        
        colorArray = (PIX *) malloc(numBytes);
-       if (colorArray == 0) FUBAR("ERROR: Unable to allocate color table.");
+       if (colorArray == 0)
+               throw Exception("ERROR: Unable to allocate color table.");
 
        totalByteCount += numBytes;
 
@@ -302,7 +303,7 @@
                loadTable(filename);
        } catch(Exception e) {
                LOG( ("Error while loading Color Table: %s", e.getMessage()) );
-               FUBAR("ERROR: Unable to load %s", filename);
+               throw Exception("ERROR: Unable to load %s", filename);
        }
 } // end ColorTable::loadTableError
 
@@ -346,7 +347,7 @@
                saveTable(filename);
        } catch(Exception e) {
                printf("Exception while saving colortable: '%s'.\n", 
e.getMessage());
-               FUBAR("Couldn't save color table '%s'.", filename);
+               throw Exception("Couldn't save color table '%s'.", filename);
        }
 } // end ColorTable::saveTableError
 
Index: netpanzer/src/Lib/2D/DigitText.cpp
diff -u netpanzer/src/Lib/2D/DigitText.cpp:1.4 
netpanzer/src/Lib/2D/DigitText.cpp:1.5
--- netpanzer/src/Lib/2D/DigitText.cpp:1.4      Sat Sep  6 11:39:24 2003
+++ netpanzer/src/Lib/2D/DigitText.cpp  Sun Sep  7 16:49:02 2003
@@ -17,6 +17,7 @@
 */
 
 #include <config.h>
+#include "Exception.hpp"
 #include "DigitText.hpp"
 
 
@@ -40,10 +41,7 @@
 
        FILE *fp = fopen(charfilename, "rb");
        if (fp == 0)
-       {
-               FUBAR("ERROR: Unable to load %s", charfilename);
-               assert(false);
-       }
+               throw Exception("ERROR: Unable to load %s", charfilename);
 
        for (int y = 0; y < charactersNormal.getPixY(); y++)
        {
Index: netpanzer/src/Lib/2D/PackedSurface.cpp
diff -u netpanzer/src/Lib/2D/PackedSurface.cpp:1.4 
netpanzer/src/Lib/2D/PackedSurface.cpp:1.5
--- netpanzer/src/Lib/2D/PackedSurface.cpp:1.4  Sat Sep  6 09:12:39 2003
+++ netpanzer/src/Lib/2D/PackedSurface.cpp      Sun Sep  7 16:49:02 2003
@@ -25,6 +25,7 @@
 #include "Surface.hpp"
 #include "TimerInterface.hpp"
 #include "Span.hpp"
+#include "Exception.hpp"
 #include "UtilInterface.hpp"
 
 #ifdef MSVC
@@ -115,7 +116,7 @@
        rowOffsetTable = (int *) malloc((pix.y*frameCount + 1) * 
sizeof(*rowOffsetTable));
        if (rowOffsetTable == 0)
        {
-               FUBAR("ERROR: Unable to allocate rowTableOffset for 
PackedSurface.");
+               throw Exception("ERROR: Unable to allocate rowTableOffset for 
PackedSurface.");
        }
 
        int bytesAlloced = 0;
@@ -158,7 +159,7 @@
                                        packedDataChunk = (BYTE 
*)realloc(packedDataChunk, bytesAlloced);
                                        if (packedDataChunk == 0)
                                        {
-                                               FUBAR("ERROR: Out of memory for 
packedDataChunk for PackedSurface.");
+                                               throw Exception("ERROR: Out of 
memory for packedDataChunk for PackedSurface.");
                                        }
                                }
 
@@ -181,7 +182,7 @@
        // Shrink buffer to the size we really need
 
        packedDataChunk = (BYTE *) realloc(packedDataChunk, curByteOffset);
-       if (packedDataChunk == 0) FUBAR("Hell froze");
+       if (packedDataChunk == 0) throw Exception("Hell froze");
 
        // Restore source surface frame number, so the function
        // is logically const
@@ -192,7 +193,7 @@
 //--------------------------------------------------------------------------
 void PackedSurface::load(const char *filename) {
        FILE *f = fopen(filename, "rb");
-       if (f == 0) FUBAR("Can't open %s", filename);
+       if (f == 0) throw Exception("Can't open %s", filename);
        load(f);
        fclose(f);
 }
@@ -200,7 +201,7 @@
 //--------------------------------------------------------------------------
 void PackedSurface::save(const char *filename) const {
        FILE *f = fopen(filename, "wb");
-       if (f == 0) FUBAR("Can't create %s", filename);
+       if (f == 0) throw Exception("Can't create %s", filename);
        save(f);
        fclose(f);
 }
@@ -211,10 +212,10 @@
        int version;
        fread(&version, sizeof(version), 1, f);
        if (version < 1) {
-               FUBAR("Invalid PAK file version: %d", version);
+               throw Exception("Invalid PAK file version: %d", version);
        }
        if (version > CURRENT_PAK_VERSION) {
-               FUBAR("PAK file version %d is newer than the .exe you are 
using, which only supports up to version", version, CURRENT_PAK_VERSION);
+               throw Exception("PAK file version %d is newer than the .exe you 
are using, which only supports up to version", version, CURRENT_PAK_VERSION);
        }
        fread(&pix, sizeof(pix), 1, f);
 
@@ -226,19 +227,19 @@
        rowOffsetTable = (int *) malloc((pix.y * frameCount + 1) * 
sizeof(*rowOffsetTable));
        if (rowOffsetTable == 0)
        {
-               FUBAR("ERROR: Unable to allocate rowTableOffset for 
PackedSurface.");
+               throw Exception("ERROR: Unable to allocate rowTableOffset for 
PackedSurface.");
        }
        fread(rowOffsetTable, (pix.y*frameCount + 1)*sizeof(*rowOffsetTable), 
1, f);
        packedDataChunk = (BYTE *)malloc(rowOffsetTable[pix.y*frameCount]);
        if (packedDataChunk == 0)
        {
-               FUBAR("ERROR: Unable to allocate packedDataChunk for 
PackedSurface.");
+               throw Exception("ERROR: Unable to allocate packedDataChunk for 
PackedSurface.");
        }
        fread(packedDataChunk, rowOffsetTable[pix.y*frameCount], 1, f);
 
        // Quick check for error
 
-       if (ferror(f)) FUBAR("Error reading packed surface file!");
+       if (ferror(f)) throw Exception("Error reading packed surface file!");
 
        // Add size of rowTableOffset.
        totalByteCount += (pix.y * frameCount + 1) * sizeof(*rowOffsetTable);
@@ -260,7 +261,7 @@
 
        // Quick check for error
 
-       if (ferror(f)) FUBAR("Error writing packed surface file!");
+       if (ferror(f)) throw Exception("Error writing packed surface file!");
 }
 
 //--------------------------------------------------------------------------
Index: netpanzer/src/Lib/2D/Palette.cpp
diff -u netpanzer/src/Lib/2D/Palette.cpp:1.5 
netpanzer/src/Lib/2D/Palette.cpp:1.6
--- netpanzer/src/Lib/2D/Palette.cpp:1.5        Sat Sep  6 14:59:06 2003
+++ netpanzer/src/Lib/2D/Palette.cpp    Sun Sep  7 16:49:02 2003
@@ -16,10 +16,11 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
 #include "Palette.hpp"
 #include "FileUtil.hpp"
+#include "Exception.hpp"
 #include "UtilInterface.hpp"
-#include "gapp.hpp"
 
 float Palette::brightness = 1.0f;
        
@@ -388,9 +389,7 @@
        setName(filename);
 
        if ((fp = fopen(filename, "rb")) == 0)
-       {
-               FUBAR("Unable to open palette file: %s", filename);
-       }
+               throw Exception("Unable to open palette file: %s", filename);
 
        for (int i = 0; i < 256; i++)
        {
Index: netpanzer/src/Lib/2D/Surface.cpp
diff -u netpanzer/src/Lib/2D/Surface.cpp:1.9 
netpanzer/src/Lib/2D/Surface.cpp:1.10
--- netpanzer/src/Lib/2D/Surface.cpp:1.9        Sat Sep  6 13:15:34 2003
+++ netpanzer/src/Lib/2D/Surface.cpp    Sun Sep  7 16:49:02 2003
@@ -1174,31 +1174,32 @@
 
        // Open the PCX file
        FILE *fp = fopen(fileName,"rb");
-       if (fp == 0) { FUBAR("Unable to open %s", fileName); }
+       if (fp == 0)
+               throw Exception("Unable to open %s", fileName);
 
        // Read in the header
        PCX_HEADER header;
        fread(&header, sizeof(PCX_HEADER), 1, fp);
 
-       if (ferror(fp)) { FUBAR("Error reading .pcx file %s", fileName); }
+       if (ferror(fp))
+               throw Exception("Error reading .pcx file %s", fileName);
 
        if (header.manufacturer != 0x0a || header.version != 5)
-    {
-               FUBAR("%s is not a valid 8-bit PCX file", fileName);
-       }
+               throw Exception("%s is not a valid 8-bit PCX file", fileName);
 
        if (needAlloc)
        {
                // Allocate room for the PCX, check to see if we need the 
palette.
                if (!alloc(header.width-header.xPos+1, 
header.height-header.yPos+1, false, header.width-header.xPos+1, 1))
                {
-                       FUBAR("Not enough memory to load PCX image %s", 
fileName);
+                       throw Exception("Not enough memory to load PCX image 
%s", fileName);
                }
                }       else
                        {
                                // Check and make sure the picture will fit
                                if (pix.x < header.width || pix.y < 
header.height)
-                                       FUBAR("Not enough memory to load PCX 
image %s", fileName);
+                                       throw Exception("Not enough memory to 
load PCX image %s",
+                                                                       
fileName);
                        }
                if (returnPalette != 0)
                {
@@ -1229,7 +1230,8 @@
                                d[index++] = data;              // Else just 
store it.
                        }
        }
-       if (ferror(fp)) { FUBAR("Error reading .pcx file %s", fileName); }
+       if (ferror(fp)) 
+               throw Exception("Error reading .pcx file %s", fileName);
        fclose(fp);
 } // end Surface::loadPCX
 
@@ -1376,7 +1378,8 @@
 
        // Open the TIL file
        FILE *fp = fopen(filename, "rb");
-       if (fp == 0) { FUBAR("ERROR: Unable to load raw %s", filename); }
+       if (fp == 0)
+               throw Exception("ERROR: Unable to load raw %s", filename);
 
        // Read in the header
        PIC_HEAD head;
@@ -1392,8 +1395,7 @@
        if (ferror(fp))
        {
                ////MessageBox(gapp.hwndApp, "Error reading .raw file.", 
"Shit", MB_OK);
-               exit(1);
-               //FUBAR("Error reading .pcx file %s", fileName);
+               throw Exception("Error reading .pcx file %s", filename);
        }
 
        if (needAlloc)
@@ -1405,16 +1407,13 @@
                        if (pix.x < signed(head.xPix) || pix.y < 
signed(head.yPix) || frameCount < signed(head.frameCount))
                        {
                                ////MessageBox(gapp.hwndApp, "During loadTil, 
you chose to not allocate the memory for the image, but the was not enough 
already memory already allocated.", "Shit", MB_OK);
-                               exit(1);
+                               throw Exception("error during loadTil");
                        }
-
-                               //FUBAR("During loadTil(%s), you chose to not 
allocate the memory for the image, but the was not enough already memory 
already allocated.");
                }
+
        if (ferror(fp)) 
        {
-               //MessageBox(gapp.hwndApp, "Error reading file.", "Shit", 
MB_OK);
-               exit(1);
-               //FUBAR("Error reading file %s", fileName);
+               throw Exception("Error reading file %s", filename);
        }
 
        assert(frame0 != 0);
@@ -1428,9 +1427,7 @@
 
        if (ferror(fp))
        {
-               ////MessageBox(gapp.hwndApp, "Error reading file.", "Shit", 
MB_OK);
-               exit(1);
-               //FUBAR("Error reading file %s", fileName);
+               throw Exception("Error reading file %s", filename);
        }
 
        fclose(fp);
@@ -2187,7 +2184,7 @@
        }
        else
        {
-               FUBAR("ERROR: Invalid number of colors for color array.");
+               throw Exception("ERROR: Invalid number of colors for color 
array.");
        }
 
        for (int y = 0; y < diff.y; y++)
@@ -2345,7 +2342,10 @@
                // Fill in the middle right cell.  We know it hasn't
                // been set because of the order in which we fill in
                // the smaller squares
-               if (matrix[zm * stride + x2] != -10000.0) { FUBAR("1. 
matrix[%u, %u] != -10000 - value: %d", zm, x2, matrix[zm * stride + x2]); }
+               if (matrix[zm * stride + x2] != -10000.0) {
+                       throw Exception("1. matrix[%u, %u] != -10000 - value: 
%d",
+                                                       zm, x2, matrix[zm * 
stride + x2]);
+               }
                if (x1 < x2)
                        matrix[zm * stride + x2] = (int) (calcY((tr+br)/2.0, 
ruggedness,
                                                y2-y1));
@@ -2357,7 +2357,9 @@
                if (matrix[y1 * stride + xm] == -10000.0)
                        matrix[y1 * stride + xm] = (int) (calcY((tl+tr)/2.0, 
ruggedness,
                                                x2-x1));
-               if (matrix[y2 * stride + xm] != -10000.0) { FUBAR("2. 
matrix[%u, %u] != -10000 - value: %d", y2, xm, matrix[y2 * stride + xm]); }
+               if (matrix[y2 * stride + xm] != -10000.0) 
+                       throw Exception("2. matrix[%u, %u] != -10000 - value: 
%d",
+                                                       y2, xm, matrix[y2 * 
stride + xm]);
                if (y1 < y2)
                        matrix[y2 * stride + xm] = (int) (calcY((bl+tr)/2.0, 
ruggedness,
                                                x2-x1));
@@ -2367,7 +2369,9 @@
        // least 3x3, then this cell should have not yet been set
        if (xm < x2 && zm < y2)
        {
-               if (matrix[zm * stride + xm] != -10000.0) { FUBAR("3. 
matrix[%u, %u] != -10000 - value: %d", zm, xm, matrix[zm * stride + xm]); }
+               if (matrix[zm * stride + xm] != -10000.0) {
+                       throw Exception("3. matrix[%u, %u] != -10000 - value: 
%d", zm, xm, matrix[zm * stride + xm]);
+               }
                matrix[zm * stride + xm] = (int) (calcY((tl+tr+bl+br)/4.0, 
ruggedness,
                                        (x2-x1)+(y2-y1)));
        }
@@ -2386,7 +2390,9 @@
        for (int x = x1; x < x2 ; ++x) {
                for (int z = y1; z < y2 ; ++z) {
                        if (matrix[z * stride + x] == -10000.0) {
-                               if (matrix[z * stride + x] != -10000.0) { 
FUBAR("4. matrix[%u, %u] != -10000 - value: %d", z, x, matrix[z * stride + x]); 
}
+                               if (matrix[z * stride + x] != -10000.0) {
+                                       throw Exception("4. matrix[%u, %u] != 
-10000 - value: %d", z, x, matrix[z * stride + x]);
+                               }
                        }
                }
        }
@@ -2403,7 +2409,8 @@
 
        // Create some temp buffer to generate the values in.
        int *tempBuf = (int *) malloc(stride * pix.y * sizeof(int));
-       if (tempBuf == 0) { FUBAR("ERROR: Unable to allocate temp fractal 
surface."); }
+       if (tempBuf == 0) { throw Exception("ERROR: Unable to allocate temp 
fractal surface.");
+       }
 
        // Initialize everything to some bogus value.
        for (int x = 0; x < stride; x++)
@@ -2412,7 +2419,7 @@
 
        //for (int num = 0; num < stride*pix.y; num++)
        //      LOG(("%d tempBuf: %d", num, tempBuf[num]));
-       //FUBAR("!EXIT!");;
+       //throw Exception("!EXIT!");;
 
        // Initialize the corners to some value.
        tempBuf[0]                           = (int) getRand(minY, maxY);
@@ -2430,8 +2437,8 @@
        {
                for (int y = 0; y < pix.y; y++)
                {
-                       //if (tempBuf[y * stride + x] < 0)   tempBuf[y * stride 
+ x] = 0;//FUBAR("tempBuf[y * stride + x] < 0,   value: %d", tempBuf[y * stride 
+ x]);
-                       //if (tempBuf[y * stride + x] > 255) tempBuf[y * stride 
+ x] = 255;//FUBAR("tempBuf[y * stride + x] > 255, value: %d", tempBuf[y * 
stride + x]);
+                       //if (tempBuf[y * stride + x] < 0)   tempBuf[y * stride 
+ x] = 0;//throw Exception("tempBuf[y * stride + x] < 0,   value: %d", 
tempBuf[y * stride + x]);
+                       //if (tempBuf[y * stride + x] > 255) tempBuf[y * stride 
+ x] = 255;//throw Exception("tempBuf[y * stride + x] > 255, value: %d", 
tempBuf[y * stride + x]);
                        //LOG(("tempBuf[y * stride + x]: %d", tempBuf[y * 
stride + x]));
                        if (tempBuf[y * stride + x] < yMin) yMin = tempBuf[y * 
stride + x];
                        if (tempBuf[y * stride + x] > yMax) yMax = tempBuf[y * 
stride + x];
@@ -2656,7 +2663,9 @@
        int numBytes = pix.x * pix.y * sizeof(BYTE);
        
        if (numBytes <= 0) return;
-       if (mem == 0) { FUBAR("ERROR: This should not happen."); }
+       if (mem == 0) {
+               throw Exception("ERROR: This should not happen.");
+       }
 
        fread(mem, numBytes, 1, fp);
 
@@ -2722,8 +2731,12 @@
 
        int numBytes = pix.x * pix.y * sizeof(BYTE);
        
-       if (numBytes <= 0) { FUBAR("ERROR: Trying to write surface when 
(numBytes <= 0)."); }
-       if (mem == 0) { FUBAR("ERROR: Trying to write surface when (mem == 
0)."); }
+       if (numBytes <= 0) {
+               throw Exception("ERROR: Trying to write surface when (numBytes 
<= 0).");
+       }
+       if (mem == 0) {
+               throw Exception("ERROR: Trying to write surface when (mem == 
0).");
+       }
 
        fwrite(mem, numBytes, 1, fp);
 
@@ -2758,7 +2771,9 @@
        int numBytes = pix.x * pix.y * sizeof(BYTE);
        
        if (numBytes <= 0) return;
-       if (mem == 0) { FUBAR("ERROR: This should not happen."); }
+       if (mem == 0) { 
+               throw Exception("ERROR: This should not happen.");
+       }
 
        fread(mem, numBytes, 1, fp);
 
@@ -3344,7 +3359,7 @@
                        // Get the max image size.
                        if (!tempSurface.loadTIL(strBuf))
                        {
-                               FUBAR("ERROR: This should not happen!");
+                               throw Exception("ERROR: This should not 
happen!");
                        }
                        if (maxSize.x < tempSurface.getPix().x)
                        {
@@ -3611,7 +3626,7 @@
        int *zBuffer = new int[getArea()];
        if (zBuffer == 0)
        {
-               FUBAR("Unable to allocate zBuffer.");
+               throw Exception("Unable to allocate zBuffer.");
        }
     
        //Random rnd=new Random();
@@ -3715,13 +3730,13 @@
        // Check for uncompressed/true-color.
        if (TGAheader.imageType != UNCOMPRESSEDtrueCOLOR) 
        {
-               FUBAR("ERROR: TGAheader.imageType != UNCOMPRESSEDtrueCOLOR");
+               throw Exception("ERROR: TGAheader.imageType != 
UNCOMPRESSEDtrueCOLOR");
        }
 
        // Check for 24-bits per pixel.
        if (TGAheader.bitsPerPixel != 24) 
        {
-               FUBAR("ERROR: TGAheader.bitsPerPixel != 24");
+               throw Exception("ERROR: TGAheader.bitsPerPixel != 24");
        }
 
        // Mark the starting point of the image data
@@ -4662,29 +4677,33 @@
        if (needAlloc) free();
 
        FILE *fp = fopen(fileName,"rb");
-       if (fp == 0) { FUBAR("Unable to open %s", fileName); }
+       if (fp == 0) {
+               throw Exception("Unable to open %s", fileName);
+       }
 
     fread( &file_header, sizeof(BitmapFileHeader), 1, fp ); 
  
-       if (ferror(fp)) { FUBAR("Error reading .bmp file %s", fileName); }
+       if (ferror(fp)) {
+               throw Exception("Error reading .bmp file %s", fileName);
+       }
     
     if ( file_header.bfType != 0x4d42 ) // file_header.bfType != "BM"
      {
-      FUBAR("%s is not a valid 8-bit BMP file", fileName);
+      throw Exception("%s is not a valid 8-bit BMP file", fileName);
      }
   
     fread( &info_header, sizeof(BitmapInfoHeader), 1, fp ); 
  
-       if (ferror(fp)) { FUBAR("Error reading .bmp file %s", fileName); }
+       if (ferror(fp)) { throw Exception("Error reading .bmp file %s", 
fileName); }
   
     if ( info_header.biBitCount != 8 )
      {
-      FUBAR("%s is not a 8-bit BMP file", fileName);     
+      throw Exception("%s is not a 8-bit BMP file", fileName);     
      }
     
     if ( info_header.biCompression != BI_RGB )
      {
-      FUBAR("%s is not a 8-bit UnCompressed BMP file", fileName);     
+      throw Exception("%s is not a 8-bit UnCompressed BMP file", fileName);    
 
      }
 
        if (needAlloc)
@@ -4692,7 +4711,7 @@
       
       if (!alloc(info_header.biWidth, info_header.biHeight , false, 
info_header.biWidth, 1) )
           {
-           FUBAR("Not enough memory to load BMP image %s", fileName);
+           throw Exception("Not enough memory to load BMP image %s", fileName);
           }
                
      }
@@ -4700,7 +4719,7 @@
         {
          // Check and make sure the picture will fit
          if (pix.x < (long) info_header.biWidth|| pix.y < (long) 
info_header.biHeight )
-           FUBAR("Not enough memory to load BMP image %s", fileName);
+           throw Exception("Not enough memory to load BMP image %s", fileName);
         }
    
    fseek(fp, file_header.bfOffBits, SEEK_SET);
@@ -4727,7 +4746,7 @@
           } 
      }
 
-   if (ferror(fp)) { FUBAR("Error reading .bmp file %s", fileName); }
+   if (ferror(fp)) { throw Exception("Error reading .bmp file %s", fileName); }
        fclose(fp);
    
    flipVertical();  
@@ -4980,7 +4999,7 @@
 
        if ((fp = fopen(oldPalette, "rb")) == 0)
        {
-               FUBAR("Unable to open palette file: %s", (const char *) 
oldPalette);
+               throw Exception("Unable to open palette file: %s", (const char 
*) oldPalette);
        }
 
        {for (int i = 0; i < 256; i++)
Index: netpanzer/src/Lib/Interfaces/UtilInterface.cpp
diff -u netpanzer/src/Lib/Interfaces/UtilInterface.cpp:1.6 
netpanzer/src/Lib/Interfaces/UtilInterface.cpp:1.7
--- netpanzer/src/Lib/Interfaces/UtilInterface.cpp:1.6  Sat Sep  6 16:49:45 2003
+++ netpanzer/src/Lib/Interfaces/UtilInterface.cpp      Sun Sep  7 16:49:02 2003
@@ -24,6 +24,7 @@
 #include <string.h>
 #include "SplitPath.hpp"
 #include "FindFirst.hpp"
+#include "Exception.hpp"
 #include "UtilInterface.hpp"
 
 bool gSpanBlittingFlag = false;
@@ -168,7 +169,7 @@
 {
        if (ferror(fp))
        {
-               FUBAR("ERROR: Possible corrupt file.");
+               throw Exception("ERROR: Possible corrupt file.");
        }
 
 } // end UtilInterface::checkError
Index: netpanzer/src/Lib/Particles/CloudParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/CloudParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/CloudParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/CloudParticle2D.cpp:1.4 Sat Sep  6 11:39:24 2003
+++ netpanzer/src/Lib/Particles/CloudParticle2D.cpp     Sun Sep  7 16:49:02 2003
@@ -21,6 +21,7 @@
 #include "TimerInterface.hpp"
 #include "PackedSurface.hpp"
 #include "GameConfig.hpp"
+#include "Exception.hpp"
 #include "Sprite.hpp"
 
 
@@ -94,7 +95,7 @@
        Surface tempSurface;
        if (!tempSurface.loadAllTILInDirectory(path))
        {
-               FUBAR("ERROR: Unable to load any cloud images in %s", path);
+               throw Exception("ERROR: Unable to load any cloud images in %s", 
path);
        }
 
        tempSurface.shrinkWrap();
Index: netpanzer/src/Lib/Particles/FireParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/FireParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/FireParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/FireParticle2D.cpp:1.4  Sat Sep  6 11:18:18 2003
+++ netpanzer/src/Lib/Particles/FireParticle2D.cpp      Sun Sep  7 16:49:02 2003
@@ -62,7 +62,7 @@
        //color = BYTE(totalTime * 44); // This 44 is based on the life of 0.25 
secs and 12 colors possible.
        color = BYTE(totalTime * 22); // This 22 is based on the life of 0.50 
secs and 12 colors possible.
 
-       //if (color >= 12) FUBAR("ERROR: Invalid color reached for fire.");
+       //if (color >= 12) throw Exception("ERROR: Invalid color reached for 
fire.");
        assert(color < 12);
 
        // const unsigned halfSize = 1;
Index: netpanzer/src/Lib/Particles/FlameParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/FlameParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/FlameParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/FlameParticle2D.cpp:1.4 Sat Sep  6 11:39:24 2003
+++ netpanzer/src/Lib/Particles/FlameParticle2D.cpp     Sun Sep  7 16:49:02 2003
@@ -17,6 +17,7 @@
 */
 
 #include <config.h>
+#include "Exception.hpp"
 #include "FlameParticle2D.hpp"
 
 cGrowList <PackedSurface> FlameParticle2D::staticPackedExplosion0;
@@ -135,14 +136,14 @@
 
        if (!loadAllPAKInDirectory(pathExplosion0, staticPackedExplosion0))
        {
-               FUBAR("ERROR: Unable to load any exposion images in %s", 
pathExplosion0);
+               throw Exception("ERROR: Unable to load any exposion images in 
%s", pathExplosion0);
        }
 
        char pathExplosion1[] = "pics/particles/explosion/explosion1/pak/";
 
        if (!loadAllPAKInDirectory(pathExplosion1, staticPackedExplosion1))
        {
-               FUBAR("ERROR: Unable to load any exposion images in %s", 
pathExplosion1);
+               throw Exception("ERROR: Unable to load any exposion images in 
%s", pathExplosion1);
        }
 }
 
Index: netpanzer/src/Lib/Particles/FlashParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/FlashParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/FlashParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/FlashParticle2D.cpp:1.4 Sat Sep  6 11:39:24 2003
+++ netpanzer/src/Lib/Particles/FlashParticle2D.cpp     Sun Sep  7 16:49:02 2003
@@ -15,15 +15,14 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "FlashParticle2D.hpp"
 #include "UtilInterface.hpp"
 
-
 PackedSurface FlashParticle2D::staticPackedFlash;
 
-
 // FlashParticle2D
 //---------------------------------------------------------------------------
 FlashParticle2D::FlashParticle2D(      const fXYZ  &pos,
@@ -74,7 +73,7 @@
 
        if (!surface.loadTIL("pics/particles/lights/til/flash2.til"))
        {
-               FUBAR("ERROR: Unable to load 
""pics/particles/lights/til/flash2.til""");
+               throw Exception("ERROR: Unable to load 
""pics/particles/lights/til/flash2.til""");
        }
 
        const float minFlashSize =  10.0f;
Index: netpanzer/src/Lib/Particles/Particle2D.cpp
diff -u netpanzer/src/Lib/Particles/Particle2D.cpp:1.3 
netpanzer/src/Lib/Particles/Particle2D.cpp:1.4
--- netpanzer/src/Lib/Particles/Particle2D.cpp:1.3      Fri Sep  5 22:01:18 2003
+++ netpanzer/src/Lib/Particles/Particle2D.cpp  Sun Sep  7 16:49:02 2003
@@ -16,9 +16,9 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 //---------------------------------------------------------------------------
-
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "Particle2D.hpp"
 #include "TimerInterface.hpp"
 #include "PackedSurface.hpp"
@@ -76,7 +76,7 @@
        // Check for trying to create a particle that's too big.
        if (numBytes > MAX_PARTICLE_CLASS_SIZE)
        {
-               FUBAR("ERROR: Tried to create a particle with class size %d 
bytes, but max particle class object size is %d bytes", numBytes, 
MAX_PARTICLE_CLASS_SIZE);
+               throw Exception("ERROR: Tried to create a particle with class 
size %d bytes, but max particle class object size is %d bytes", numBytes, 
MAX_PARTICLE_CLASS_SIZE);
        }
 
        // Check if all slots used.
Index: netpanzer/src/Lib/Particles/PuffParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/PuffParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/PuffParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/PuffParticle2D.cpp:1.4  Sat Sep  6 11:39:24 2003
+++ netpanzer/src/Lib/Particles/PuffParticle2D.cpp      Sun Sep  7 16:49:02 2003
@@ -22,6 +22,7 @@
 #include "TimerInterface.hpp"
 #include "ParticleSystemGlobals.hpp"
 #include "UtilInterface.hpp"
+#include "Exception.hpp"
 #include "GameConfig.hpp"
 
 
@@ -96,7 +97,7 @@
                packedSurfaceShadow.setData(staticPackedDirtPuff[index]);
        } else
        {
-               FUBAR("ERROR: Unsupported particleType.");
+               throw Exception("ERROR: Unsupported particleType.");
        }
 
        packedSurfaceShadow.setDrawModeBlend(&Palette::colorTableDarkenALittle);
@@ -192,7 +193,7 @@
        {
                if (!tempSurface.loadAllTILInDirectory(pathSmokeLight))
                {
-                       FUBAR("ERROR: Unable to load any smoke puff particle 
images in %s", pathSmokeLight);
+                       throw Exception("ERROR: Unable to load any smoke puff 
particle images in %s", pathSmokeLight);
                }
 
                tempSurface.scale(i);
@@ -209,7 +210,7 @@
        {
                if (!tempSurface.loadAllTILInDirectory(pathSmokeDark))
                {
-                       FUBAR("ERROR: Unable to load any smoke puff particle 
images in %s", pathSmokeDark);
+                       throw Exception("ERROR: Unable to load any smoke puff 
particle images in %s", pathSmokeDark);
                }
 
                tempSurface.scale(i);
@@ -226,7 +227,7 @@
        {
                if (!tempSurface.loadAllTILInDirectory(pathDirt))
                {
-                       FUBAR("ERROR: Unable to load any particle images in 
%s", pathDirt);
+                       throw Exception("ERROR: Unable to load any particle 
images in %s", pathDirt);
                }
 
                tempSurface.scale(i);
@@ -259,21 +260,21 @@
 
        if (!loadAllPAKInDirectory(pathSmokeLight, staticPackedSmokeLightPuff))
        {
-               FUBAR("ERROR: Unable to load any smoke puff particle images in 
%s", pathSmokeLight);
+               throw Exception("ERROR: Unable to load any smoke puff particle 
images in %s", pathSmokeLight);
        }
 
        char pathSmokeDark[] = "pics/particles/puff/smokeDark/pak/";
 
        if (!loadAllPAKInDirectory(pathSmokeDark, staticPackedSmokeDarkPuff))
        {
-               FUBAR("ERROR: Unable to load any smoke puff particle images in 
%s", pathSmokeDark);
+               throw Exception("ERROR: Unable to load any smoke puff particle 
images in %s", pathSmokeDark);
        }
 
        char pathDirt[] = "pics/particles/puff/dirt/pak/";
 
        if (!loadAllPAKInDirectory(pathDirt, staticPackedDirtPuff))
        {
-               FUBAR("ERROR: Unable to load any dirt puff particle images in 
%s", pathDirt);
+               throw Exception("ERROR: Unable to load any dirt puff particle 
images in %s", pathDirt);
        }
 }
 
@@ -287,7 +288,7 @@
        if (!smokeLightPuffSprite.loadAllPAKInDirectory(pathSmokeLight))
        //if (!smokeLightPuffSprite.loadAllRAWInDirectory(pathSmokeLightRAW, 
iXY(320, 240)))
        {
-               FUBAR("ERROR: Unable to load any smoke puff particle images in 
%s", pathSmokeLight);
+               throw Exception("ERROR: Unable to load any smoke puff particle 
images in %s", pathSmokeLight);
        }
 
        // Following code is for reducing the size of the images.
@@ -299,7 +300,7 @@
 
        if (!smokeDarkPuffSprite.loadAllPAKInDirectory(pathSmokeDark))
        {
-               FUBAR("ERROR: Unable to load any smoke puff particle images in 
%s", pathSmokeDark);
+               throw Exception("ERROR: Unable to load any smoke puff particle 
images in %s", pathSmokeDark);
        }
 
        // Following code is for reducing the size of the images.
@@ -311,7 +312,7 @@
 
        if (!dirtPuffSprite.loadAllPAKInDirectory(pathDirt))
        {
-               FUBAR("ERROR: Unable to load any dirt puff particle images in 
%s", pathDirt);
+               throw Exception("ERROR: Unable to load any dirt puff particle 
images in %s", pathDirt);
        }
 
        // Following code is for reducing the size of the images.
Index: netpanzer/src/Lib/View/Component.cpp
diff -u netpanzer/src/Lib/View/Component.cpp:1.3 
netpanzer/src/Lib/View/Component.cpp:1.4
--- netpanzer/src/Lib/View/Component.cpp:1.3    Fri Sep  5 22:01:18 2003
+++ netpanzer/src/Lib/View/Component.cpp        Sun Sep  7 16:49:02 2003
@@ -15,9 +15,9 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "Component.hpp"
 #include "ViewGlobals.hpp"
 #include "View.hpp"
@@ -39,7 +39,7 @@
        //name = strdup("");
        //if (name = 0)
        //{
-       //      FUBAR("ERROR: Unable to allocate component name.");
+       //      throw Exception("ERROR: Unable to allocate component name.");
        //}
 } // end Component::reset
 
@@ -60,7 +60,7 @@
        assert(parent != 0);
        if (parent == 0)
        {
-               FUBAR("ERROR: Component parent == 0");
+               throw Exception("ERROR: Component parent == 0");
        }
 
        Component::parent = parent;
Index: netpanzer/src/Lib/View/Desktop.cpp
diff -u netpanzer/src/Lib/View/Desktop.cpp:1.5 
netpanzer/src/Lib/View/Desktop.cpp:1.6
--- netpanzer/src/Lib/View/Desktop.cpp:1.5      Sat Sep  6 11:18:18 2003
+++ netpanzer/src/Lib/View/Desktop.cpp  Sun Sep  7 16:49:02 2003
@@ -180,7 +180,7 @@
 
                        if (lMouseView != 0 && mouseActions != 0)
                        {
-                               //FUBAR("Double click!");
+                               //throw Exception("Double click!");
 
                                // Yes - it's a double click.  Inform the 
window as such.
                                
//lMouseView->lMouseDouble(lMouseView->getScreenToClientPos(mousePos));
@@ -260,7 +260,7 @@
                        // Is this a double click? **FIX THE DOUBLE CLICK 
SENSITIVITY**
                        if (rMouseView != 0 && now() <= rDoubleClickDeadline && 
0)
                        {
-                                //FUBAR("Double click!");
+                                //throw Exception("Double click!");
 
                                 // Yes - it's a double click.  Inform the 
window as such.
                                 
rMouseView->rMouseDouble(rMouseView->getScreenToClientPos(mousePos));
Index: netpanzer/src/Lib/View/String.cpp
diff -u netpanzer/src/Lib/View/String.cpp:1.3 
netpanzer/src/Lib/View/String.cpp:1.4
--- netpanzer/src/Lib/View/String.cpp:1.3       Fri Sep  5 22:01:18 2003
+++ netpanzer/src/Lib/View/String.cpp   Sun Sep  7 16:49:02 2003
@@ -15,9 +15,9 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "String.hpp"
 
 // String
@@ -30,7 +30,7 @@
        mem    = new char [length + 1];
        if (mem == 0)
        {
-               FUBAR("ERROR: Unable to allocate string.");
+               throw Exception("ERROR: Unable to allocate string.");
        }
        strcpy(mem, string);
 
@@ -46,7 +46,7 @@
        mem    = new char [length + 1];
        if (mem == 0)
        {
-               FUBAR("ERROR: Unable to allocate string.");
+               throw Exception("ERROR: Unable to allocate string.");
        }
        strcpy(mem, string.mem);
 
@@ -74,7 +74,7 @@
                mem    = new char [length + 1];
                if (mem == 0)
                {
-                       FUBAR("ERROR: Unable to allocate string.");
+                       throw Exception("ERROR: Unable to allocate string.");
                }
                strcpy(mem, string.mem);
        }
@@ -93,7 +93,7 @@
        mem    = new char [length + 1];
        if (mem == 0)
        {
-               FUBAR("ERROR: Unable to allocate string.");
+               throw Exception("ERROR: Unable to allocate string.");
        }
        strcpy(mem, tempPtr);
        strcat(mem, string.mem);
Index: netpanzer/src/Lib/View/String.hpp
diff -u netpanzer/src/Lib/View/String.hpp:1.2 
netpanzer/src/Lib/View/String.hpp:1.3
--- netpanzer/src/Lib/View/String.hpp:1.2       Mon Sep  1 16:24:20 2003
+++ netpanzer/src/Lib/View/String.hpp   Sun Sep  7 16:49:02 2003
@@ -19,6 +19,7 @@
 #ifndef __String_hpp__
 #define __String_hpp__
 
+#include <assert.h>
 #include <iostream>
 
 #include "codewiz.hpp"
@@ -26,11 +27,6 @@
 using std::ostream;
 using std::istream;
 
-#if _MSC_VER > 1000
-       #pragma once
-#endif
-
-
 //--------------------------------------------------------------------------
 class String
 {
@@ -92,11 +88,7 @@
        // return char reference.
        char &operator [](int subscript)
        {
-               if (subscript < 0 || subscript >= length)
-               {
-                       FUBAR("ERROR: Indexing string out of bounds.");
-               }
-
+               assert(subscript > 0 && subscript < length);
                return mem[subscript];
        }
        
Index: netpanzer/src/Lib/View/View.cpp
diff -u netpanzer/src/Lib/View/View.cpp:1.5 netpanzer/src/Lib/View/View.cpp:1.6
--- netpanzer/src/Lib/View/View.cpp:1.5 Sat Sep  6 11:39:24 2003
+++ netpanzer/src/Lib/View/View.cpp     Sun Sep  7 16:49:03 2003
@@ -24,6 +24,7 @@
 #include "fXY.hpp"
 #include "loadPics.hpp"
 #include "ViewGlobals.hpp"
+#include "Exception.hpp"
 #include "InputEvent.hpp"
 
 
@@ -72,7 +73,7 @@
                componentsUsedCount++;
        } else
        {
-               FUBAR("ERROR: Trying to add more componentList than 
pre-allocated, increase the pre-allocated amount.");
+               throw Exception("ERROR: Trying to add more componentList than 
pre-allocated, increase the pre-allocated amount.");
        }
 
 } // end View::add
@@ -90,32 +91,32 @@
        if (topBorder.getFrameCount() <= 0)
        {
                sprintf(strBuf, "pics/viewBorders/btop.til");
-               if (!topBorder.loadTIL(strBuf)) FUBAR("ERROR: Unable to load: 
%s", strBuf);
+               if (!topBorder.loadTIL(strBuf)) throw Exception("ERROR: Unable 
to load: %s", strBuf);
        }
        if (leftBorder.getFrameCount() <= 0)
        {
                sprintf(strBuf, "pics/viewBorders/bleft.til");
-               if (!leftBorder.loadTIL(strBuf)) FUBAR("ERROR: Unable to load: 
%s", strBuf);
+               if (!leftBorder.loadTIL(strBuf)) throw Exception("ERROR: Unable 
to load: %s", strBuf);
        }
        if (bottomBorder.getFrameCount() <= 0)
        {
                sprintf(strBuf, "pics/viewBorders/bbottom.til");
-               if (!bottomBorder.loadTIL(strBuf))      FUBAR("ERROR: Unable to 
load: %s", strBuf);
+               if (!bottomBorder.loadTIL(strBuf))      throw Exception("ERROR: 
Unable to load: %s", strBuf);
        }
        if (rightBorder.getFrameCount() <= 0)
        {
                sprintf(strBuf, "pics/viewBorders/bright.til");
-               if (!rightBorder.loadTIL(strBuf)) FUBAR("ERROR: Unable to load: 
%s", strBuf);
+               if (!rightBorder.loadTIL(strBuf)) throw Exception("ERROR: 
Unable to load: %s", strBuf);
        }
        if (topLeftCornerLarge.getFrameCount() <= 0)
        {
                sprintf(strBuf, "pics/viewBorders/bctl1.til");
-               if (!topLeftCornerLarge.loadTIL(strBuf)) FUBAR("ERROR: Unable 
to load: %s", strBuf);
+               if (!topLeftCornerLarge.loadTIL(strBuf)) throw 
Exception("ERROR: Unable to load: %s", strBuf);
        }
        if (topLeftCornerSmall.getFrameCount() <= 0)
        {
                sprintf(strBuf, "pics/viewBorders/bctl2.til");
-               if (!topLeftCornerSmall.loadTIL(strBuf)) FUBAR("ERROR: Unable 
to load: %s", strBuf);
+               if (!topLeftCornerSmall.loadTIL(strBuf)) throw 
Exception("ERROR: Unable to load: %s", strBuf);
        }
 
        // Top right corner.
@@ -1287,7 +1288,7 @@
                       const PIX &backColor)
 {
        labels = (cLabel *) realloc(labels, (numLabels+1)*sizeof(cLabel));
-       if (labels == 0) FUBAR("ERROR: Unable to allocate label.");
+       if (labels == 0) throw Exception("ERROR: Unable to allocate label.");
 
        labels[numLabels].label = strdup(label);
        assert(labels[numLabels].label != 0);
@@ -1308,7 +1309,7 @@
 {
        if (!clientArea.getDoesExist())
        {
-               FUBAR("ERROR: Client area does not exist.");
+               throw Exception("ERROR: Client area does not exist.");
        }
 
        for (int num = 0; num < numLabels; num++)
@@ -1380,7 +1381,7 @@
 
        if (highlightedButton > buttons.getCount())
        {
-               FUBAR("ERROR: highlightedButton > butons.getCount()");
+               throw Exception("ERROR: highlightedButton > butons.getCount()");
        }
 
        // Change to the highlight button frame.
@@ -1532,7 +1533,7 @@
                View::searchName = strdup(searchName);
                if (View::searchName == 0)
                {
-                       FUBAR("ERROR: Unable to allocate searchName: ", 
searchName);
+                       throw Exception("ERROR: Unable to allocate searchName: 
", searchName);
                }
        }
 } // end View::setSearchName
@@ -1554,7 +1555,7 @@
                View::title = strdup(title);
                if (View::title == 0)
                {
-                       FUBAR("ERROR: Unable to allocate title: ", title);
+                       throw Exception("ERROR: Unable to allocate title: ", 
title);
                }
        }
 } // end View::setTitle
@@ -1576,7 +1577,7 @@
                View::subTitle = strdup(subTitle);
                if (View::subTitle == 0)
                {
-                       FUBAR("ERROR: Unable to allocate subTitle: ", subTitle);
+                       throw Exception("ERROR: Unable to allocate subTitle: ", 
subTitle);
                }
        }
 } // end View::setSubTitle
@@ -1596,7 +1597,7 @@
        if (string != 0)
        {
                statusText = strdup(string);
-               if(statusText == 0) { FUBAR("ERROR: statusText == 0"); }
+               if(statusText == 0) { throw Exception("ERROR: statusText == 
0"); }
        }
 
 } // end View::showStatus
@@ -1804,8 +1805,8 @@
        destSize.y += yExtra;
 
        // Make sure the window will fit on the screen in the specified size.
-       if (destSize.x > SCREEN_XPIX) { FUBAR("ERROR: Trying to size the client 
area larger than the screen width."); }
-       if (destSize.y > SCREEN_YPIX) { FUBAR("ERROR: Trying to size the client 
area larger than the screen height."); }
+       if (destSize.x > SCREEN_XPIX) { throw Exception("ERROR: Trying to size 
the client area larger than the screen width."); }
+       if (destSize.y > SCREEN_YPIX) { throw Exception("ERROR: Trying to size 
the client area larger than the screen height."); }
 
        // Move the window accordingly to accomodate for the resize.
        if (min.x + destSize.x > SCREEN_XPIX)
@@ -1864,7 +1865,7 @@
 { 
        if (button >= buttons.getCount())
        {
-               FUBAR("ERROR: pressedButton >= numButtons");
+               throw Exception("ERROR: pressedButton >= numButtons");
        }
        
        prevPressedButton = pressedButton;
@@ -1878,7 +1879,7 @@
 { 
        if (button >= buttons.getCount())
        {
-               FUBAR("ERROR: highlightedButton >= numButtons");
+               throw Exception("ERROR: highlightedButton >= numButtons");
        }
 
        prevHighlightedButton = highlightedButton;
@@ -1958,7 +1959,7 @@
                {
                        flagFuckMax = 0;
                        max.x = SCREEN_XPIX - 1;
-                       //FUBAR("ERROR: The window is too large for the 
screen.");
+                       //throw Exception("ERROR: The window is too large for 
the screen.");
                }
                
        }
@@ -1975,7 +1976,7 @@
                        flagFuckMax = 0;
                        max.y = SCREEN_YPIX - 1;
 
-                       //FUBAR("ERROR: The window is too large for the 
screen.");
+                       //throw Exception("ERROR: The window is too large for 
the screen.");
                }
                
        }
@@ -2094,7 +2095,7 @@
                                        
inputFields[selectedInputField].addExtendedChar(shit);
                                } else
                                {
-                                       FUBAR("ERROR: Expecting extended char 
code.");
+                                       throw Exception("ERROR: Expecting 
extended char code.");
                                }
                        } else
                        {
Index: netpanzer/src/Lib/View/cButton.cpp
diff -u netpanzer/src/Lib/View/cButton.cpp:1.3 
netpanzer/src/Lib/View/cButton.cpp:1.4
--- netpanzer/src/Lib/View/cButton.cpp:1.3      Fri Sep  5 22:01:18 2003
+++ netpanzer/src/Lib/View/cButton.cpp  Sun Sep  7 16:49:03 2003
@@ -20,6 +20,7 @@
 #include <config.h>
 #include "cButton.hpp"
 #include "Surface.hpp"
+#include "Exception.hpp"
 #include "ViewGlobals.hpp"
 
 
@@ -154,7 +155,7 @@
        Surface tempSurface;
        if(!tempSurface.loadTIL(imageName))
        {
-               FUBAR("ERROR: Unable to open button TIL file: %s", imageName);
+               throw Exception("ERROR: Unable to open button TIL file: %s", 
imageName);
        }
 
        tempTopSurface.create(tempSurface.getPix(), tempSurface.getPix().x, 3);
@@ -369,7 +370,7 @@
 void cButton::setName(const char *buttonName)
 {
        name = strdup(buttonName);
-       if (buttonName == 0) FUBAR("ERROR: Unable to allocate button name: %s", 
buttonName);
+       if (buttonName == 0) throw Exception("ERROR: Unable to allocate button 
name: %s", buttonName);
 } // end SET NAME
 
 // createPCX
Index: netpanzer/src/Lib/View/cInputField.cpp
diff -u netpanzer/src/Lib/View/cInputField.cpp:1.5 
netpanzer/src/Lib/View/cInputField.cpp:1.6
--- netpanzer/src/Lib/View/cInputField.cpp:1.5  Sat Sep  6 06:34:28 2003
+++ netpanzer/src/Lib/View/cInputField.cpp      Sun Sep  7 16:49:03 2003
@@ -15,9 +15,9 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "cInputField.hpp"
 #include "TimerInterface.hpp"
 
@@ -36,7 +36,7 @@
        cInputFieldString::string = new char [maxCharCount + 1];
        if (this->string == 0)
        {
-               FUBAR("ERROR: Unable to allocate cInputFieldString string.");
+               throw Exception("ERROR: Unable to allocate cInputFieldString 
string.");
        }
 
        if (strlen(string) > 0 && strlen(string) < (size_t) maxCharCount)
@@ -118,7 +118,7 @@
        this->excludedCharacters = new char [strlen(excludedCharacters) + 1];
        if (this->excludedCharacters == 0)
        {
-               FUBAR("ERROR: Unable to allocate cInputField 
excludedCharacters.");
+               throw Exception("ERROR: Unable to allocate cInputField 
excludedCharacters.");
        }
 
        strcpy(this->excludedCharacters, excludedCharacters);
Index: netpanzer/src/Lib/cGrowList.hpp
diff -u netpanzer/src/Lib/cGrowList.hpp:1.2 netpanzer/src/Lib/cGrowList.hpp:1.3
--- netpanzer/src/Lib/cGrowList.hpp:1.2 Mon Sep  1 16:24:18 2003
+++ netpanzer/src/Lib/cGrowList.hpp     Sun Sep  7 16:49:02 2003
@@ -114,9 +114,9 @@
                //FIXME - change to MERLMEM realloc function...
                TYPE *nArray = (TYPE *)realloc(array, nAlloced * 
sizeof(array[0]));
                if (nArray == 0) {
+                       
                        if (gottaHaveIt) {
-                               FUBAR("Unable to alloc cGrowList to %u elements 
size %u\n", nAlloced,
-                                       sizeof(array[0]));
+                               assert(false);
                        }
                        return false;
                }
Index: netpanzer/src/Lib/codewiz.hpp
diff -u netpanzer/src/Lib/codewiz.hpp:1.4 netpanzer/src/Lib/codewiz.hpp:1.5
--- netpanzer/src/Lib/codewiz.hpp:1.4   Sat Sep  6 12:06:18 2003
+++ netpanzer/src/Lib/codewiz.hpp       Sun Sep  7 16:49:02 2003
@@ -28,20 +28,6 @@
 const bool GOTTA_HAVE_IT   = true;
 const bool LIVE_WITHOUT_IT = false;
 
-//***************************************************************************
-// Standard program control/cleanup functions
-//***************************************************************************
-
-#include <stdarg.h>
-
-void cleanup(bool fubed);
-void term(int returnCode, bool fubed, const char *msg, ...);
-void vterm(int returnCode, bool fubed, const char *msg, va_list ap);
-void quitOK(const char *msg, ...);
-void FUBAR(const char *msg, ...);
-void vQuitOK(const char *msg, va_list ap);
-void vFUBAR(const char *msg, va_list ap);
-
 // XXX changed this, as it was stupid code (on unix this failed from time to
 // time
 inline bool isValidPtr(const void *ptr) {
Index: netpanzer/src/NetPanzer/Classes/SpriteSorter.cpp
diff -u netpanzer/src/NetPanzer/Classes/SpriteSorter.cpp:1.3 
netpanzer/src/NetPanzer/Classes/SpriteSorter.cpp:1.4
--- netpanzer/src/NetPanzer/Classes/SpriteSorter.cpp:1.3        Fri Sep  5 
22:01:18 2003
+++ netpanzer/src/NetPanzer/Classes/SpriteSorter.cpp    Sun Sep  7 16:49:03 2003
@@ -16,6 +16,8 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
+#include "Exception.hpp"
 #include "SpriteSorter.hpp"
 
 SpriteSorter SPRITE_SORTER;
@@ -64,7 +66,7 @@
 
   // We should never get here, unless the same sprite is
   // inserted in the list twice
-  FUBAR("sprite_key called to compare the same sprite against itself!");
+  throw Exception("sprite_key called to compare the same sprite against 
itself!");
   return 0;
 }
 
Index: netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp
diff -u netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp:1.5 
netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp:1.6
--- netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp:1.5      Sat Sep  6 
11:39:24 2003
+++ netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp  Sun Sep  7 16:49:03 2003
@@ -28,6 +28,7 @@
 #include "WorldViewInterface.hpp"
 #include "DDHardSurface.hpp"
 
+#include "Exception.hpp"
 #include "Sound.hpp"
 #include "ParticleInterface.hpp"
 #include "WeaponGlobals.hpp"
@@ -53,7 +54,7 @@
                // Missle thrust lighting.
                if (!temp.loadTIL("pics/particles/lights/til/missleThrust.til"))
                {
-                       FUBAR("SHIT!");
+                       throw Exception("SHIT!");
                }
                temp.setOffsetCenter();
                pack.pack(temp);
@@ -68,7 +69,7 @@
                // Missle ground lighting.
                if 
(!temp.loadTIL("pics/particles/lights/til/missleGroundLight.til"))
                {
-                       FUBAR("SHIT!");
+                       throw Exception("SHIT!");
                }
                temp.setOffsetCenter();
                pack.pack(temp);
Index: netpanzer/src/NetPanzer/Interfaces/Stats.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/Stats.cpp:1.3 
netpanzer/src/NetPanzer/Interfaces/Stats.cpp:1.4
--- netpanzer/src/NetPanzer/Interfaces/Stats.cpp:1.3    Fri Sep  5 22:01:19 2003
+++ netpanzer/src/NetPanzer/Interfaces/Stats.cpp        Sun Sep  7 16:49:03 2003
@@ -18,6 +18,7 @@
 #include <config.h>
 #include "Stats.hpp"
 
+#include "Exception.hpp"
 #include "ObjectiveInterface.hpp"
 #include "GameConfig.hpp"
 
@@ -54,7 +55,7 @@
 
   // We should never get here, unless the same sprite is
   // inserted in the list twice
-  FUBAR("sprite_key called to compare the same sprite against itself!");
+  throw Exception("sprite_key called to compare the same sprite against 
itself!");
   return 0;
 }
 
@@ -80,7 +81,7 @@
 
   // We should never get here, unless the same sprite is
   // inserted in the list twice
-  FUBAR("sprite_key called to compare the same sprite against itself!");
+  throw Exception("sprite_key called to compare the same sprite against 
itself!");
   return 0;
  }
 
@@ -106,7 +107,7 @@
 
   // We should never get here, unless the same sprite is
   // inserted in the list twice
-  FUBAR("sprite_key called to compare the same sprite against itself!");
+  throw Exception("sprite_key called to compare the same sprite against 
itself!");
   return 0;
  }
 
Index: netpanzer/src/NetPanzer/Views/Game/ChatView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/ChatView.cpp:1.3 
netpanzer/src/NetPanzer/Views/Game/ChatView.cpp:1.4
--- netpanzer/src/NetPanzer/Views/Game/ChatView.cpp:1.3 Fri Sep  5 22:01:19 2003
+++ netpanzer/src/NetPanzer/Views/Game/ChatView.cpp     Sun Sep  7 16:49:03 2003
@@ -15,9 +15,9 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "ChatView.hpp"
 #include "Desktop.hpp"
 #include "KeyboardInterface.hpp"
@@ -103,7 +103,7 @@
        scrollBar = new ScrollBar(VERTICAL, 0, 1, 0, 100);
        if (scrollBar == 0)
        {
-               FUBAR("ERROR: Unable to allocate the scrollBar.");
+               throw Exception("ERROR: Unable to allocate the scrollBar.");
        }
 
        //iRect clientRect(getClientRect());
Index: netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp:1.4 
netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp:1.4   Sat Sep  6 
06:34:29 2003
+++ netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp       Sun Sep  7 
16:49:03 2003
@@ -120,7 +120,7 @@
        //scrollBar = new ScrollBar(VERTICAL, 0, 1, 0, text.getCount());
        //if (scrollBar == 0)
        //{
-       //      FUBAR("ERROR: Unable to allocate the scrollBar.");
+       //      throw Exception("ERROR: Unable to allocate the scrollBar.");
        //}
        //
        //iRect clientRect(getClientRect());
Index: netpanzer/src/NetPanzer/Views/Game/LobbyView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/LobbyView.cpp:1.6 
netpanzer/src/NetPanzer/Views/Game/LobbyView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/Game/LobbyView.cpp:1.6        Sat Sep  6 
11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/Game/LobbyView.cpp    Sun Sep  7 16:49:03 2003
@@ -15,9 +15,9 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
+#include "Exception.hpp"
 #include "LobbyView.hpp"
 #include "Desktop.hpp"
 #include "UIDraw.hpp"
@@ -191,7 +191,7 @@
 
        if (!backgroundSurface.loadTIL(string))
        {
-               FUBAR("ERROR: Unable to load menu background surface: %s", 
(const char *) string);
+               throw Exception("ERROR: Unable to load menu background surface: 
%s", (const char *) string);
        }
 
 } // end MenuTemplateView::loadBackgroundSurface
Index: netpanzer/src/NetPanzer/Views/Game/ProgressView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/ProgressView.cpp:1.6 
netpanzer/src/NetPanzer/Views/Game/ProgressView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/Game/ProgressView.cpp:1.6     Sat Sep  6 
11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/Game/ProgressView.cpp Sun Sep  7 16:49:03 2003
@@ -16,7 +16,9 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
 #include "ProgressView.hpp"
+#include "Exception.hpp"
 #include "Desktop.hpp"
 #include "UIDraw.hpp"
 #include "DDHardSurface.hpp"
@@ -281,7 +283,7 @@
 
        if (!backgroundSurface.loadTIL(string))
        {
-               FUBAR("ERROR: Unable to load menu background surface: %s", 
(const char *) string);
+               throw Exception("ERROR: Unable to load menu background surface: 
%s", (const char *) string);
        }
 
 } // end MenuTemplateView::loadBackgroundSurface
Index: netpanzer/src/NetPanzer/Views/Game/RankView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/RankView.cpp:1.3 
netpanzer/src/NetPanzer/Views/Game/RankView.cpp:1.4
--- netpanzer/src/NetPanzer/Views/Game/RankView.cpp:1.3 Fri Sep  5 22:01:19 2003
+++ netpanzer/src/NetPanzer/Views/Game/RankView.cpp     Sun Sep  7 16:49:03 2003
@@ -16,6 +16,8 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
+#include "Exception.hpp"
 #include "RankView.hpp"
 #include "Stats.hpp"
 #include "GameViewGlobals.hpp"
@@ -62,7 +64,7 @@
        scrollBar = new ScrollBar(VERTICAL, 0, 1, 0, 100);
        if (scrollBar == 0)
        {
-               FUBAR("ERROR: Unable to allocate the scrollBar.");
+               throw Exception("ERROR: Unable to allocate the scrollBar.");
        }
 
        //iRect clientRect(getClientRect());
Index: netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.4 
netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.4     Sat Sep 
 6 11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp Sun Sep  7 
16:49:03 2003
@@ -16,6 +16,8 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
+#include "Exception.hpp"
 #include "VehicleSelectionView.hpp"
 #include "UnitTypes.hpp"
 #include "GameViewGlobals.hpp"
@@ -456,34 +458,34 @@
        Surface tempSurface;
        int i = 0;
 
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/manta.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/manta.til")) { throw 
Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/panther1.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/panther1.til")) { 
throw Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/titan.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/titan.til")) { throw 
Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/stinger.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/stinger.til")) { 
throw Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/bobcat.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/bobcat.til")) { 
throw Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/bear.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/bear.til")) { throw 
Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/archer.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/archer.til")) { 
throw Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/wolf.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/wolf.til")) { throw 
Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/drake.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/drake.til")) { throw 
Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
-       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/scout.til")) { 
FUBAR("Shit!"); }
+       if 
(!tempSurface.loadTIL("pics/menus/vehicleSelectionView/til/scout.til")) { throw 
Exception("Shit!"); }
        unitImages.setFrame(i++);
        tempSurface.blt(unitImages);
        unitImages.setFrame(i++);
Index: netpanzer/src/NetPanzer/Views/Game/_MiniMapView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/_MiniMapView.cpp:1.4 
netpanzer/src/NetPanzer/Views/Game/_MiniMapView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/Game/_MiniMapView.cpp:1.4     Fri Sep  5 
22:01:19 2003
+++ netpanzer/src/NetPanzer/Views/Game/_MiniMapView.cpp Sun Sep  7 16:49:03 2003
@@ -154,7 +154,7 @@
        Surface *miniMap = MiniMapInterface::getMiniMap();
        if (miniMap == 0)
        {
-               FUBAR("ERROR: Unable to find minimap surface.");
+               throw Exception("ERROR: Unable to find minimap surface.");
        }
 
        miniMapSurface.copy(*miniMap);
@@ -181,7 +181,7 @@
        Surface *miniMap = MiniMapInterface::getMiniMap();
        if (miniMap == 0)
        {
-               FUBAR("ERROR: Unable to find minimap surface.");
+               throw Exception("ERROR: Unable to find minimap surface.");
        }
 
        // Check to see if this map need to be rescaled.
Index: netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.7 
netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.7     Sat Sep 
 6 18:31:20 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp Sun Sep  7 
16:49:03 2003
@@ -33,9 +33,9 @@
 #include "PackedSurface.hpp"
 #include "UtilInterface.hpp"
 #include "GameManager.hpp"
+#include "Exception.hpp"
 #include "GameViewGlobals.hpp"
 
-
 Surface       MenuTemplateView::backgroundSurface;
 PackedSurface MenuTemplateView::titlePackedSurface;
 
@@ -279,7 +279,7 @@
                        backgroundSurface.blt(viewArea, 0, 0);
                } else
                {
-                       FUBAR("Where is the background surface?");
+                       throw Exception("Where is the background surface?");
                }
 
                //titlePackedSurface.blt(clientArea, bodyTextRect.min.x, 390);
@@ -310,7 +310,7 @@
        //      }
        //} else
        //{
-       //      FUBAR("Where is the title surface?");
+       //      throw Exception("Where is the title surface?");
        //}
 
        //iRect r(100, 100, 200, 110);
@@ -335,7 +335,7 @@
        //      globeSurface.bltBlend(viewArea, 0, 0, Palette::colorTable8020);
        //} else
        //{
-       //      FUBAR("Where is the fucking globe surface?");
+       //      throw Exception("Where is the fucking globe surface?");
        //}
 
        View::doDraw(viewArea, clientArea);
@@ -370,7 +370,7 @@
                //
                //              if 
(!tempSurface.loadAllTILInDirectory("pics/backgrounds/menus/globe/til/"))
                //              {
-               //                      FUBAR("Shit");
+               //                      throw Exception("Shit");
                //              }
                //              tempSurface.setFPS(14);
                //
@@ -399,7 +399,7 @@
 {
        if (!backgroundSurface.loadTIL(string))
        {
-               FUBAR("ERROR: Unable to load menu background surface: %s", 
(const char *) string);
+               throw Exception("ERROR: Unable to load menu background surface: 
%s", (const char *) string);
        }
 
 } // end MenuTemplateView::doLoadBackgroundSurface
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp:1.6 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp:1.6      
Sat Sep  6 13:15:34 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp  Sun Sep 
 7 16:49:03 2003
@@ -51,7 +51,7 @@
        //scrollBar = new ScrollBar(HORIZONTAL, 0, 1, 0, flags.getFrameCount());
        //if (scrollBar == 0)
        //{
-       //      FUBAR("ERROR: Unable to allocate scrollBar.");
+       //      throw Exception("ERROR: Unable to allocate scrollBar.");
        //}
        //
        //scrollBar->setViewableAmount(getClientRect().getSizeX() / 
flags.getPixX());
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp
diff -u 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.6 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.6   
Sat Sep  6 11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp       
Sun Sep  7 16:49:03 2003
@@ -27,6 +27,7 @@
 #include "DDHardSurface.hpp"
 #include "FontSystem2D.hpp"
 #include "HostView.hpp"
+#include "Exception.hpp"
 #include "MapSelectionView.hpp"
 #include "PlayerNameView.hpp"
 #include "FlagSelectionView.hpp"
@@ -345,7 +346,7 @@
        Surface tempSurface;
        if (!tempSurface.loadTIL("pics/vehicleSelectionMenu/light.til"))
        {
-               FUBAR("ERROR: Unable to open 
pics/vehicleSelectionMenu/light.til to find the size to make the buttons.");
+               throw Exception("ERROR: Unable to open 
pics/vehicleSelectionMenu/light.til to find the size to make the buttons.");
        }
        
        iXY buttonSize(tempSurface.getPix());
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.8 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.9
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.8       
Sat Sep  6 16:49:45 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp   Sun Sep 
 7 16:49:03 2003
@@ -194,11 +194,11 @@
 /*
                if (strlen(netPanzerMapHeader.name) > 255)
                {
-                       FUBAR("Map name is too long.");
+                       throw Exception("Map name is too long.");
                }
                if (strlen(netPanzerMapHeader.description) > 255)
                {
-                       FUBAR("Map description is too long.");
+                       throw Exception("Map description is too long.");
                }
 */
                _splitpath(fileList[i].name, 0, 0, mapList[i].name, 0);
@@ -246,7 +246,7 @@
        assert(mapList.getCount() > 0);
        if (mapList.getCount() <= 0)
        {
-               FUBAR("ERROR: No maps in map directory");
+               throw Exception("ERROR: No maps in map directory");
        }
        
        GameConfig::setGameMapName(MapSelectionView::mapList[curMap].name);
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiMapSelectorView.cpp
diff -u 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiMapSelectorView.cpp:1.4 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiMapSelectorView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiMapSelectorView.cpp:1.4   
Sat Sep  6 11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiMapSelectorView.cpp       
Sun Sep  7 16:49:03 2003
@@ -94,11 +94,11 @@
 /*
                if (strlen(netPanzerMapHeader.name) > 255)
                {
-                       FUBAR("Map name is too long.");
+                       throw Exception("Map name is too long.");
                }
                if (strlen(netPanzerMapHeader.description) > 255)
                {
-                       FUBAR("Map description is too long.");
+                       throw Exception("Map description is too long.");
                }
 */
                sprintf(mapList[i].name, "%s", netPanzerMapHeader.name);
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiVehicleSelectorView.cpp
diff -u 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiVehicleSelectorView.cpp:1.4 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiVehicleSelectorView.cpp:1.5
--- 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiVehicleSelectorView.cpp:1.4   
    Sat Sep  6 11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/MultiVehicleSelectorView.cpp   
Sun Sep  7 16:49:03 2003
@@ -41,7 +41,7 @@
 {
        if (!images.loadAllTILInDirectory("pics/vehicleSelectionMenu/"))
        {
-               FUBAR("ERROR: Unable to load any vehicles in 
MultiVehicleSelectorView::loadImages.");
+               throw Exception("ERROR: Unable to load any vehicles in 
MultiVehicleSelectorView::loadImages.");
        }
 
 } // end MultiVehicleSelectorView::loadImages
Index: netpanzer/src/NetPanzer/Views/MainMenu/SpecialButtonView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/SpecialButtonView.cpp:1.4 
netpanzer/src/NetPanzer/Views/MainMenu/SpecialButtonView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/MainMenu/SpecialButtonView.cpp:1.4    Sat Sep 
 6 11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/SpecialButtonView.cpp        Sun Sep 
 7 16:49:03 2003
@@ -15,17 +15,16 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
 #include "SpecialButtonView.hpp"
 #include "Surface.hpp"
 #include "PackedSurface.hpp"
 #include "UtilInterface.hpp"
 #include "Desktop.hpp"
+#include "Exception.hpp"
 #include "WorldInputCmdProcessor.hpp"
 
-
 // addSpecialButton
 //---------------------------------------------------------------------------
 void SpecialButtonView::addSpecialButton(const iXY &pos, const char 
*labelString, const char *fileString, ITEM_FUNC function)
@@ -63,7 +62,7 @@
                // Create.
                if (!tempSurface.loadTIL(strBuf))
                {
-                       FUBAR("shit");
+                       throw Exception("shit");
                }
                
                //-------------------
@@ -81,7 +80,7 @@
 
                if (!tempSurface.loadTIL(strBuf))
                {
-                       FUBAR("shit");
+                       throw Exception("shit");
                }
                
                //-------------------
@@ -96,7 +95,7 @@
 
                if (!tempSurface.loadTIL(strBuf))
                {
-                       FUBAR("shit");
+                       throw Exception("shit");
                }
                
                //-------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]