Code Search for Developers
 
 
  

Errors.h from MaNGOS at Krugle


Show Errors.h syntax highlighted

/* 
 * Copyright (C) 2005,2006,2007 MaNGOS <http://www.mangosproject.org/>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef MANGOSSERVER_ERRORS_H
#define MANGOSSERVER_ERRORS_H

#define WPAssert( assertion ) { if( !(assertion) ) { fprintf( stderr, "\n%s:%i ASSERTION FAILED:\n  %s\n", __FILE__, __LINE__, #assertion ); assert( #assertion &&0 ); } }
#define WPError( assertion, errmsg ) if( ! (assertion) ) { sLog.outError( "%s:%i ERROR:\n  %s\n", __FILE__, __LINE__, (char *)errmsg ); assert( false ); }
#define WPWarning( assertion, errmsg ) if( ! (assertion) ) { sLog.outError( "%s:%i WARNING:\n  %s\n", __FILE__, __LINE__, (char *)errmsg ); }

#define WPFatal( assertion, errmsg ) if( ! (assertion) ) { sLog.outError( "%s:%i FATAL ERROR:\n  %s\n", __FILE__, __LINE__, (char *)errmsg ); assert( #assertion &&0 ); abort(); }

#define ASSERT WPAssert
#endif




See more files for this project here

MaNGOS

MaNGOS is an object-oriented Massively Multiplayer Online Role-Playing Game Server (MMORPGS). It\'s an educational project, to help developers get familar with large scale C++ and C# development projects.

Project homepage: http://sourceforge.net/projects/mangos
Programming language(s): C,C++,SQL
License: gpl2

  Auth/
    AuthCrypt.cpp
    AuthCrypt.h
    BigNumber.cpp
    BigNumber.h
    Sha1.cpp
    Sha1.h
    md5.c
    md5.h
  Config/
    dotconfpp/
      dotconfpp.cpp
      dotconfpp.h
      mempool.cpp
      mempool.h
    Config.cpp
    Config.h
    ConfigEnv.h
    ConfigLibrary.vcproj
  Database/
    DBCStores.cpp
    DBCStores.h
    DBCStructure.h
    DBCfmt.cpp
    Database.cpp
    Database.h
    DatabaseEnv.h
    DatabaseImpl.h
    DatabaseMysql.cpp
    DatabaseMysql.h
    DatabasePostgre.cpp
    DatabasePostgre.h
    DatabaseSqlite.cpp
    DatabaseSqlite.h
    Field.cpp
    Field.h
    MySQLDelayThread.h
    QueryResult.h
    QueryResultMysql.cpp
    QueryResultMysql.h
    QueryResultPostgre.cpp
    QueryResultPostgre.h
    QueryResultSqlite.cpp
    QueryResultSqlite.h
    SQLStorage.cpp
    SQLStorage.h
    SqlDelayThread.cpp
    SqlDelayThread.h
    SqlOperations.cpp
    SqlOperations.h
    dbcfile.cpp
    dbcfile.h
  Network/
    Base64.cpp
    Base64.h
    CircularBuffer.cpp
    CircularBuffer.h
    IFile.h
    ISocketHandler.cpp
    ISocketHandler.h
    Ipv4Address.cpp
    Ipv4Address.h
    Ipv6Address.cpp
    Ipv6Address.h
    ListenSocket.h
    Mutex.cpp
    Mutex.h
    Parse.cpp
    Parse.h
    RandomNumber.cpp
    RandomNumber.h
    ResolvServer.cpp
    ResolvServer.h
    ResolvSocket.cpp
    ResolvSocket.h
    SctpSocket.h
    Socket.cpp
    Socket.h
    SocketAddress.h
    SocketHandler.cpp
    SocketHandler.h
    StdLog.h
    StdoutLog.cpp
    StdoutLog.h
    TcpSocket.cpp
  vmap/
  Base.cpp
  Base.h
  ByteBuffer.h
  Common.h
  Errors.h
  Log.cpp
  Log.h
  Makefile.am
  MemoryLeaks.cpp
  MemoryLeaks.h
  Mthread.cpp
  Mthread.h
  PacketLog.cpp
  PacketLog.h
  ProgressBar.cpp
  ProgressBar.h
  SystemConfig.h.in
  Timer.h
  Util.cpp
  Util.h
  WorldPacket.h