ircproxy  The Ultimate Cyborg

exceptions.h File Reference


Detailed Description

This file contains the declaration of exception related classes and (debug) macros.

Definition in file exceptions.h.

#include "debug.h"
#include <stdexcept>
#include <sstream>

Go to the source code of this file.

Namespaces

namespace  edragon

Classes

class  unknown_target
 An exception class. More...
class  FatalError
 An exception class. More...

Defines

#define THROW_EXCEPTION(exception, debug_msg...)
 Throw an exception.

Functions

template<class E>
void edragon::throw_exception (E const &exception, std::string const &debug_msg)
 Throw an exception.
template<class E>
void edragon::caught (E const &exception)
 Debugging function.


Define Documentation

#define THROW_EXCEPTION ( exception,
debug_msg...   ) 

Value:

do { \
      std::ostringstream __ssbuf; \
      __ssbuf << debug_msg; \
      edragon::throw_exception(exception, __ssbuf.str()); \
    } while (0)
Throw an exception.

Always use this macro to throw an exception in eDragon.

Parameters:
exception The exception to be thrown.
debug_msg A simple string for debugging purposes, to clarify the reason why the exception is thrown.
Debug output has the form:

EXCEPTIONS: [<addr location>: ]<debug_msg>, throwing exception "<exception.what()>".

Definition at line 110 of file exceptions.h.

Referenced by Target::clientside_get_channel(), Authentication::decode_pass(), Target::get_joined_nick(), ServerSession::get_nick(), ClientSession::get_nick(), Identity::pass_as_is_to_server(), PersistXML::serialize(), and Target::serverside_get_channel().


Copyright © 2005-2007 Carlo Wood.  All rights reserved.