#include "aa_config.h"
#include <iomanip>
#include <sstream>
#include <iosfwd>
#include <string>
#include <string.h>
Go to the source code of this file.
Defines | |
#define | tVERIFY(x) { if ( !( x ) ){ char const * mess = "Assertion " #x " failed"; tERR_ERROR_INT( mess ); } } |
#define | tERR_DUMP(level, stream, stuff) |
#define | tERR_FLOW() |
#define | tERR_FLOW_HIGH() |
#define | tERR_FLOW_LOW() |
#define | tASSERT(x) |
#define | tASSERT_EVAL(x) x |
#define | tERR_ERROR_INT(mess) { std::ostringstream s; s << "Internal error in " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << "\nPlease send a Bug report!" << '\0'; st_PresentError( "Internal Error", s.str().c_str() );} |
#define | tERR_ERROR(mess) { std::ostringstream s; s << "Error in " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << '\n'; st_PresentError( "Error", s.str().c_str() ); } |
#define | tERR_MESSAGE(mess) { std::ostringstream s; s << "Message from " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << '\n'; st_PresentMessage( "Message", s.str().c_str() ); } |
#define | tERR_WARN(mess) {con << "Warning in " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << '\n';} |
Functions | |
void | st_Breakpoint () |
void | st_PresentError (const char *caption, const char *message) |
void | st_PresentMessage (const char *caption, const char *message) |
#define tASSERT | ( | x | ) |
Definition at line 73 of file tError.h.
Referenced by ePath::Add(), nBandwidthSceduler::AddArbitrator(), tDecoratableManagerBase::AddDecorator(), eGrid::AddEdge(), eGrid::AddFaceAll(), eTeam::AddPlayer(), eTeam::AddPlayerDirty(), tReferencable< eWall >::AddRef(), nNetObject::AddRef(), tCommandLineParser::Advance(), gCycleMovement::AdvanceDestination(), tMemMan::Alloc(), tMemManager::Alloc(), memblock::Alloc(), gNetPlayerWall::Alpha(), gPlayerWall::Alpha(), tCommandLineData::Analyse(), gCycleMovement::ApplyAcceleration(), tRecorderTemplate3< BLOCK, DATA1, DATA2 >::Archive(), tRecorderTemplate2< BLOCK, DATA >::Archive(), tRecorderTemplate1< BLOCK >::Archive(), tRecorderSync< DATA >::Archive(), nSocket::Bind(), gNetPlayerWall::BlowHole(), nSocket::Broadcast(), gCycleMovement::CalculateAcceleration(), CanPass(), gNetPlayerWall::Check(), gPlayerWall::Check(), tMemManager::Check(), memblock::Check(), eHalfEdge::Check(), eDual::Check(), eGrid::Check(), CheckLoop(), nSocket::CheckNewConnection(), memblock::chunk(), clamp(), ClampMovement(), rTextureRenderTarget::Clear(), rDisplayList::ClearAll(), nNetObject::ClearAll(), tConsoleFilterComparator::Compare(), ConnectToServerCore(), gCycleMovement::CopyFrom(), rSurface::CopyFrom(), eHalfEdge::CopyIntoGrid(), eTempEdge::CopyIntoGrid(), eFace::CorrectArea(), CountSameIP(), nSocket::Create(), eFace::Create(), ePlayerNetID::CreateNewTeam(), gCycleExtrapolator::CreatorDescriptor(), tSettingRotation::Current(), gAIPlayer::CycleBlocksWay(), memblock::data(), memblock::Dispose(), Distance(), gCycleMovement::DistanceToDestination(), rGluintObjectDummy::DoDelete(), eVoteItemHarmServerControlled::DoFillFromMessage(), eVoteItemHarmServerControlled::DoFillToMessage(), rGluintObjectDummy::DoGen(), eGrid::DrawLine(), cWidget::Map::DrawMap(), cWidget::Map::DrawObjects(), eGameObject::eGameObject(), eHalfEdge::eHalfEdge(), eMenuItemVote::eMenuItemVote(), eNetGameObject::eNetGameObject(), uMenuItemAction::Enter(), gCycle::Extrapolate(), eHalfEdge::FindPath(), eFace::FindReplacement(), eGrid::FindSurroundingFace(), eSoundMixer::FirstAvailableChannel(), nAddress::FromHostent(), gAISensor::gAISensor(), gCycleChatBot::Get(), tRandomizer::Get(), tPathToExecutable::Get(), uJoystick::GetAxis(), uJoystick::GetBall(), tDecoratableManager< Decorated >::GetBase(), nConfItemVersionWatcher::GetBehavior(), uJoystick::GetButton(), gServerFavoritesHolder::GetFavorite(), tXmlParserNamespace::tXmlParser::node::GetFirstChild(), rGradient::GetGradientPt(), uJoystick::GetHat(), uJoystick::GetHatDirection(), tTextFileRecorder::GetLine(), tXmlParserNamespace::tXmlParser::node::GetName(), tCommandLineParser::GetOption(), tPlaybackBlockBase::GetPlaybackStream(), tXmlParserNamespace::tXmlParser::node::GetProp(), nServerInfo::GetRandomMaster(), tRecordingBlockBase::GetRecordingStream(), tReferencable< eWall >::GetRefcount(), tDecoratableManagerBase::GetSize(), tCommandLineParser::GetSwitch(), gPlayerWall::GlobalToLocal(), tCoord::GrahamScan(), tXmlParserNamespace::tXmlParser::node::HasProp(), tHeapElement::Heap(), tHeapBase::Insert(), eGrid::Insert(), gDestination::InsertIntoList(), eFace::Insideness(), eTeam::Invite(), gNetPlayerWall::IsDangerousAnywhere(), eFace::IsInside(), tXmlParserNamespace::tXmlParser::node::IsOfType(), gPlayerWall::LocalToGlobal(), main(), Modifier(), eGameObject::Move(), glRenderer::MultMatrix(), gNetPlayerWall::MyInitAfterCreation(), gCycle::MyInitAfterCreation(), net_destroy_handler(), nNetObject::nNetObject(), nQueryMessageStats::nQueryMessageStats(), nServerInfoAdmin::nServerInfoAdmin(), gAIPlayer::Object(), rDisplayList::OnCall(), gCycle::OnDropTempWall(), gBaseZoneHack::OnEnter(), tTextFileRecorder::Open(), nSocket::Open(), nObserverPtr< ePlayerNetID >::operator *(), gCycleMemory::operator()(), tString::operator()(), tArray< uSelectItem< tString > *, false >::operator()(), tXmlParserNamespace::tXmlParser::node::operator++(), nObserverPtr< ePlayerNetID >::operator->(), tPlayback::operator=(), tRecording::operator=(), tRandomizer::operator=(), operator>>(), tString::operator[](), tArray< uSelectItem< tString > *, false >::operator[](), nKrawall::nScrambledPassword::operator[](), uPlayerPrototype::PlayerConfig(), rTextureRenderTarget::Pop(), gNetPlayerWall::Pos(), gPlayerWall::Pos(), eGrid::ProcessWallsInRange(), ProcessWallsRecursive(), vValue::Expr::Bindings::Legacy::ConfItem::Read(), tRecorderBlockHelper< DATA >::Read(), nSocket::Read(), nNetObject::ReadCreate(), tConfItem_key::ReadVal(), gNetPlayerWall::real_CopyIntoGrid(), gNetPlayerWall::RealWallReceived(), rec_peer(), ePlayerNetID::ReceiveControlNet(), nNetObject::Register(), tReferencable< eWall >::Release(), nNetObject::Release(), tList< uSelectItem< Vote > >::Remove(), tHeapBase::Remove(), nBandwidthSceduler::RemoveArbitrator(), tHeapElement::RemoveFromHeap(), eTeam::RemovePlayerDirty(), eGameObject::RenderAll(), ePoint::Replace(), rTextureRenderTarget::rTextureRenderTarget(), S_BlowHoles(), memblock::safety(), nKrawall::nMethod::ScramblePassword(), se_LinkFaces(), se_NewChatMessage(), se_OldChatMessage(), se_SendPrivateMessage(), se_SendTeamMessage(), se_ServerControlledChatMessage(), se_ServerControlledChatMessageConsole(), se_WantLogin(), nMessage::Send(), nMessage::SendImmediately(), nServerLag::SetClient(), tString::SetLen(), tCharacterFilter::SetMap(), eHalfEdge::SetMinPathLength(), eHalfEdge::SetOther(), eNetGameObject::SetPlayer(), tString::SetSize(), ePlayerNetID::SetTeam(), tHeapElement::SetVal(), sg_ClearConnectionItems(), sg_DropTempWall(), sg_GenerateConnectionItems(), sg_UseAntiLagSliding(), eTeam::Shuffle(), eHalfEdge::Simplify(), eGrid::SimplifyNum(), sn_DoDestroy(), sn_GetTimeout(), eHalfEdge::Split(), rDisplayListFiller::Start(), rDisplayListFiller::Stop(), ePlayer::StoreConfitem(), su_GetJoystick(), tString::SubStr(), tHeapBase::SwapIf(), eTeam::SwapPlayers(), gCycle::SyncEnemy(), gCycle::SyncFromExtrapolator(), tAdvanceFrame(), nBandwidthTaskPriorizer::Tasks(), tCallback::tCallback(), tCallbackAnd::tCallbackAnd(), tCallbackOr::tCallbackOr(), tCallbackString::tCallbackString(), tDEFINE_REFOBJ(), gNetPlayerWall::Time(), gPlayerWall::Time(), gCycleMovement::TimestepCore(), gCycleExtrapolator::TimestepCore(), tListItem< tConsoleFilter >::tListItem(), tOutput::tOutput(), tPlayback::tPlayback(), tRandomizer::tRandomizer(), tRecording::tRecording(), uAction::uAction(), uJoystick::uJoystick(), uKeyInput::uKeyInput(), eTeam::UnInvite(), eFace::Unlink(), ePoint::Unlink(), ePlayerNetID::Update(), uPlayerPrototype::uPlayerPrototype(), rISurfaceTexture::Upload(), nBandwidthSceduler::UseBandwidth(), eHalfEdge::Vec(), nSocket::Write(), gNetPlayerWall::WriteCreate(), eDual::~eDual(), gGame::~gGame(), GrowingArrayBase::~GrowingArrayBase(), nBandwidthArbitrator::~nBandwidthArbitrator(), nNetObjectRegistrar::~nNetObjectRegistrar(), rDisplayList::~rDisplayList(), tHeapElement::~tHeapElement(), and tReferencable< eWall >::~tReferencable().
#define tERR_ERROR | ( | mess | ) | { std::ostringstream s; s << "Error in " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << '\n'; st_PresentError( "Error", s.str().c_str() ); } |
Definition at line 104 of file tError.h.
Referenced by nMessage::BroadcastCollected(), tCheckedPTRBase::Check(), tCheckedPTRBase::CheckDestructed(), GrowingArrayBase::ComplainIfFull(), deptest::deptest(), eStackGameObject::DoRemoveFromGame(), first_fill_ids(), nAddress::FromString(), GeneratePrefix(), nNetObject::GetID(), GrowingArrayBase::GrowingArrayBase(), gArena::LeastDangerousSpawnPoint(), main(), gCycle::MyInitAfterCreation(), net_sync_handler(), next_free_server_nokill(), nWaitForAck::nWaitForAck(), rFont::OnSelect(), eNetGameObject::ReceiveControl(), nNetObject::ReceiveControlNet(), nNetObject::Release(), nNetObject::RequestSync(), GrowingArrayBase::ResizeBase(), rModel::rModel(), sn_SendPlanned1(), sr_InitDisplay(), sr_ReinitDisplay(), nNetObject::WriteSync(), yylex(), floattest::~floattest(), and nNetObject::~nNetObject().
#define tERR_ERROR_INT | ( | mess | ) | { std::ostringstream s; s << "Internal error in " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << "\nPlease send a Bug report!" << '\0'; st_PresentError( "Internal Error", s.str().c_str() );} |
Definition at line 102 of file tError.h.
Referenced by tMemManager::CheckHeap(), tHeapBase::CheckHeap(), eGrid::DrawLine(), tLanguage::FindStrict(), gGame::NetSync(), next_free(), tOutput::operator const char *(), tArray< uSelectItem< tString > *, false >::operator+(), nMessage::operator<<(), tArray< uSelectItem< tString > *, false >::operator[](), tMemManager::Remove(), tList< uSelectItem< Vote > >::Remove(), tHeapBase::Remove(), tMemManager::Replace(), tHeapBase::Replace(), eHalfEdge::Split(), and tConfItemBase::tConfItemBase().
#define tERR_FLOW_LOW | ( | ) |
Definition at line 72 of file tError.h.
Referenced by tArray< uSelectItem< tString > *, false >::~tArray().
#define tERR_MESSAGE | ( | mess | ) | { std::ostringstream s; s << "Message from " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << '\n'; st_PresentMessage( "Message", s.str().c_str() ); } |
Definition at line 106 of file tError.h.
Referenced by tCommandLineData::Analyse(), FindDataPath(), and tString::operator[]().
#define tERR_WARN | ( | mess | ) | {con << "Warning in " << __PRETTY_FUNCTION__ << " in " << __FILE__<< ':' << __LINE__ << " : \n \t" << mess << '\n';} |
Definition at line 108 of file tError.h.
Referenced by cWidget::Base::DisplayError(), FindConfigurationPath(), eGameObject::FindCurrentFace(), eHalfEdge::FindPath(), tXmlParserNamespace::tXmlParser::node::GetProp(), tPath::GetWritePath(), tPathResource::GetWritePath(), eWavData::LoadWavFile(), nNetObject::Object(), cWidget::WithIdData::Process(), cWidget::WithCaption::ProcessCaptionLocation(), cWidget::WithTable::ProcessCell(), cCockpit::ProcessCockpit(), cWidget::WithDataFunctions::ProcessConditional(), cWidget::WithDataFunctions::ProcessConditionalCore(), cWidget::WithDataFunctions::ProcessDataTags(), cWidget::WithColorFunctions::ProcessGradient(), cWidget::WithDataFunctions::ProcessMath(), cCockpit::ProcessWidgetCamera(), cCockpit::ProcessWidgets(), rec_peer(), tHeapBase::Remove(), rResourceTexture::Select(), sn_SendPlanned1(), st_checkAuthor(), st_checkCategory(), st_checkExtension(), st_checkName(), st_checkType(), st_checkVersion(), and tResourcePath::tResourcePath().
#define tVERIFY | ( | x | ) | { if ( !( x ) ){ char const * mess = "Assertion " #x " failed"; tERR_ERROR_INT( mess ); } } |
Definition at line 44 of file tError.h.
Referenced by nConfItemVersionWatcher::AdaptVersion(), eLag::Credit(), gTextureCycle::ProcessImage(), eLag::Report(), nAddress::SetAddress(), sn_GetVersionString(), and eLag::TakeCredit().
void st_Breakpoint | ( | ) |
Definition at line 46 of file tError.cpp.
Referenced by gAIPlayer::ActOnData(), memblock::Alloc(), tRecorderSync< DATA >::Archive(), gAITeam::BalanceWithAIs(), eNetGameObject::ClearToTransmit(), gDestination::CopyFrom(), eFace::CorrectArea(), eGrid::DrawLine(), gAIPlayer::EmergencySurvive(), eGameObject::FindCurrentFace(), gGame::GameLoop(), tXmlParserNamespace::tXmlParser::node::GetProp(), gNetPlayerWall::IndexPos(), nNOInitialisator< T >::Init(), init_game_objects(), gCycleMovement::InitAfterCreation(), gCycle::InitAfterCreation(), kill_id_hog(), eCameraSensor::LookAround(), eGameObject::Move(), gNetPlayerWall::MyInitAfterCreation(), gCycleMovement::MyInitAfterCreation(), nWaitForAck::nWaitForAck(), nWaitForAckSync::nWaitForAckSync(), gCycle::OnNotifyNewDestination(), eGrid::ProcessWallsInRange(), nMessage::Read(), gNetPlayerWall::real_Update(), nNetObject::RelabelOnConnect(), eGrid::RemoveEdge(), eGrid::RemovePoint(), gCycle::Render(), gAIPlayer::RightBeforeDeath(), se_DisplayChatLocally(), nMessage::Send(), nMessage::SendImmediately(), eAccessLevelHolder::SetAccessLevel(), tString::SetLen(), gAIPlayer::SetNumberOfAIs(), sg_Timestamp(), st_PresentError(), st_PresentMessage(), rSysDep::SwapGL(), eTimer::SyncTime(), tAdvanceFrame(), tCurrentAccessLevel::tCurrentAccessLevel(), gAIPlayer::Think(), gAIPlayer::ThinkSurvive(), gCycleMovement::Timestep(), gAIPlayer::Timestep(), gCycleMovement::TimestepCore(), tMemStack::~tMemStack(), and tStackObject< T >::~tStackObject().
00046 { 00047 #ifdef DEBUG 00048 std::cout << "Breakpoint!\n"; 00049 int i=0; // a chance to get errors in GDB 00050 i++; 00051 #endif 00052 }
void st_PresentError | ( | const char * | caption, | |
const char * | message | |||
) |
Definition at line 56 of file tError.cpp.
References st_Breakpoint().
Referenced by main().
00057 { 00058 std::cerr << caption << ": " << message << "\n"; 00059 st_Breakpoint(); 00060 static bool error = true; // to disable the error if it is inconvenient right now and you think it may not be fatal 00061 if ( error ) 00062 { 00063 throw 1; //tSimpleException( message, caption ); 00064 exit(-1); 00065 } 00066 }
void st_PresentMessage | ( | const char * | caption, | |
const char * | message | |||
) |
Definition at line 68 of file tError.cpp.
References st_Breakpoint().
00069 { 00070 std::cerr << caption << ": " << message << "\n"; 00071 st_Breakpoint(); 00072 }