Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2008, 4:28:42 AM (16 years ago)
Author:
landauf
Message:
  • added more exceptions to handle problems while loading a level or single objects
  • dedicated server runs and clients may join, but there are still some heavy problems
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/core/Loader.cc

    r2019 r2161  
    3737#include "Namespace.h"
    3838#include "util/Debug.h"
     39#include "util/Exception.h"
    3940
    4041#include "tinyxml/ticpp.h"
     
    157158            return true;
    158159        }
    159         catch(ticpp::Exception& ex)
     160        catch (ticpp::Exception& ex)
     161        {
     162            COUT(1) << std::endl;
     163            COUT(1) << "An XML-error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
     164            COUT(1) << ex.what() << std::endl;
     165            COUT(1) << "Loading aborted." << std::endl;
     166            return false;
     167        }
     168        catch (Exception& ex)
     169        {
     170            COUT(1) << std::endl;
     171            COUT(1) << "A loading-error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
     172            COUT(1) << ex.what() << std::endl;
     173            COUT(1) << "Loading aborted." << std::endl;
     174            return false;
     175        }
     176        catch (std::exception& ex)
    160177        {
    161178            COUT(1) << std::endl;
    162179            COUT(1) << "An error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
    163180            COUT(1) << ex.what() << std::endl;
     181            COUT(1) << "Loading aborted." << std::endl;
     182            return false;
     183        }
     184        catch (...)
     185        {
     186            COUT(1) << std::endl;
     187            COUT(1) << "An unknown error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
    164188            COUT(1) << "Loading aborted." << std::endl;
    165189            return false;
Note: See TracChangeset for help on using the changeset viewer.