Files
TCPlayerbotCore/src/server/shared/Debugging/Errors.h
T

42 lines
1.7 KiB
C++
Raw Normal View History

2010-10-07 15:54:07 +02:00
/*
2012-12-31 23:15:50 +01:00
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
2010-10-07 15:54:07 +02:00
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* 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, see <http://www.gnu.org/licenses/>.
2008-10-02 16:23:55 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-14 11:57:03 -05:00
#ifndef TRINITYCORE_ERRORS_H
#define TRINITYCORE_ERRORS_H
2009-10-17 15:51:44 -07:00
namespace Trinity {
2009-10-17 15:51:44 -07:00
void Assert(char const *file, int line, char const *function, char const *message);
void Fatal(char const *file, int line, char const *function, char const *message);
void Error(char const *file, int line, char const *function, char const *message);
void Warning(char const *file, int line, char const *function, char const *message);
} // namespace Trinity
#define WPAssert(cond) do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond); } while(0)
#define WPFatal(cond, msg) do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
#define WPError(cond, msg) do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
#define WPWarning(cond, msg) do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#define ASSERT WPAssert
2008-10-02 16:23:55 -05:00
#endif