Changeset 2945

Show
Ignore:
Timestamp:
04/27/06 06:33:51 (3 years ago)
Author:
madcat
Message:

Handle unhandled exceptions gracefully.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hydranode/hncore/cgcomm/client.cpp

    r2862 r2945  
    9191 
    9292                std::istringstream packet(m_inBuf.substr(5, size)); 
    93                 (*it).second->handle(packet); 
     93                try { 
     94                        (*it).second->handle(packet); 
     95                } catch (std::runtime_error &e) { 
     96                        logError( 
     97                                boost::format("CGComm:%s: %s") 
     98                                % (*it).first % e.what() 
     99                        ); 
     100                } 
    94101                m_inBuf.erase(0, size + 5); 
    95102        }