Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 19, 2009, 11:17:51 PM (15 years ago)
Author:
rgrieder
Message:

Added Exception::handleMessage() (copy from Game::getExceptionMessage) function that returns the exception message (if retrievable) when catching with "…"
and adjusted some exception handlers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/IRC.cc

    r5738 r5747  
    3232
    3333#include "util/Convert.h"
     34#include "util/Exception.h"
    3435#include "ConsoleCommand.h"
    3536#include "CoreIncludes.h"
     
    6465        catch (Tcl::tcl_error const &e)
    6566        {   COUT(1) << "Tcl (IRC) error: " << e.what();   }
    66         catch (std::exception const &e)
    67         {   COUT(1) << "Error while initializing Tcl (IRC): " << e.what();   }
     67        catch (...)
     68        {   COUT(1) << "Error while initializing Tcl (IRC): " << Exception::handleMessage();   }
    6869
    6970        this->nickname_ = "orx" + multi_cast<std::string>(static_cast<unsigned int>(rand()));
     
    9495        catch (Tcl::tcl_error const &e)
    9596        {   COUT(1) << "Tcl (IRC) error: " << e.what();   }
    96         catch (std::exception const &e)
    97         {   COUT(1) << "Error while executing Tcl (IRC): " << e.what();   }
     97        catch (...)
     98        {   COUT(1) << "Error while executing Tcl (IRC): " << Exception::handleMessage();   }
    9899
    99100        return false;
Note: See TracChangeset for help on using the changeset viewer.