include/Exception.h File Reference

#include <string>
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>

Include dependency graph for Exception.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pcce

Classes

class  pcce::Exception
 Base class for all Protocce exceptions. More...

Defines

#define PCCE_THROW(error)   throw(pcce::Exception((error), __FILE__, __LINE__))
 Macro to throw an Exception.
#define PCCE_CHECK(cond, error)   pcce::check< pcce::Exception >((cond), (error), __FILE__, __LINE__)
 Macro to check a condition and throw an exception if it is false.

Functions

template<class T>
void pcce::check (bool condition, const std::string &error, const std::string &fileName, const unsigned int lineNumber)
 This function throws an exception if the condition is false.


Define Documentation

#define PCCE_CHECK ( cond,
error   )     pcce::check< pcce::Exception >((cond), (error), __FILE__, __LINE__)

Macro to check a condition and throw an exception if it is false.

This macro takes care of calling check() and setting the file name and line number.

Parameters:
cond Boolean whether the condition was met or not
error Description of the error to throw if cond is false
See also:
pcce::Exception pcce::check

Definition at line 134 of file Exception.h.

Referenced by pcce::ISound::AcquireNextID(), pcce::EventConnectionManager::AddConnection(), pcce::EventDispatcher::AddHandler(), pcce::EventConnectionManager::AddHandler(), pcce::ProcessList::AddProcess(), pcce::IThreadedSubSystem::AddThreadHandler(), pcce::XmlNode::BuildAttributes(), pcce::Timer::CheckCustomTimer(), pcce::CompareReal(), pcce::Scene::CreateOgreCamera(), pcce::Scene::CreateOgreEntity(), pcce::XmlDoc::CreateRootNode(), pcce::EventDispatcher::DispatchEvent(), pcce::IThreadedSubSystem::DispatchThreadEventBlocking(), pcce::IThreadedSubSystem::DispatchThreadEvents(), pcce::SoundSubSystem::DoAcquireSource(), pcce::ProcessList::DoDeleteCurrentItem(), DoGetBuffer(), pcce::ResourceManager::DoGetFactory(), pcce::ProcessList::DoHandleCurrentItem(), pcce::ResourceManager::DoSanityCheck(), pcce::OggStream::EmptyQueuedBuffers(), pcce::ProcessList::ExecuteAllProcesses(), pcce::ProcessList::ExecuteProcesses(), pcce::Format(), pcce::GenSource(), pcce::SoundResource::GetBuffer(), pcce::OggFile::GetChannelCount(), pcce::Timer::GetCustomTimerStartTime(), pcce::OggFile::GetFrequency(), pcce::GameObjectDB::GetGameObject(), pcce::Scene::GetGameObjectID(), pcce::OggFile::GetInfo(), GetTimeOfDayWrapper(), pcce::GetTimeSinceStart(), pcce::RenderSubSystem::Impl::GetWindowHandle(), pcce::RenderSubSystem::HandleSceneChangeEvent(), pcce::HandleThreadExceptionEvent(), pcce::RenderSubSystem::Impl::Initialize(), pcce::Protocce::Initialize(), pcce::InputSubSystem::Impl::Initialize(), pcce::InitializeAL(), pcce::intrusive_ptr_add_ref(), pcce::intrusive_ptr_release(), pcce::LoadOgg(), pcce::LoadWav(), pcce::GameObjectDB::NewGameObject(), pcce::XmlDoc::NodeFromElement(), pcce::OggFile::Open(), pcce::Vector4::operator()(), pcce::Vector3::operator()(), VariantConverter< T >::operator()(), pcce::Matrix4::operator()(), pcce::OggStream::Pause(), pcce::OggStream::Play(), pcce::Protocce::PopState(), pcce::OggStream::ProcessedBuffers(), pcce::OggStream::QueueBuffer(), pcce::OggStream::QueuedBufferCount(), pcce::EventSystem::QueueEvent(), pcce::OggFile::Read(), pcce::IResource::Release(), pcce::IThreadedSubSystem::RemoveThreadHandler(), pcce::Timer::ResetCustomTimer(), pcce::OggFile::Rewind(), pcce::RoundTo(), pcce::Protocce::RunGame(), pcce::Scene::Scene(), pcce::GameObject::SetEntity(), pcce::SoundResource::SetFileName(), pcce::OggFile::SetFileName(), pcce::GameObject::SetRenderModelName(), pcce::EventType< pcce::SoundStreamEvent >::sGetEventType(), pcce::OggStream::Stop(), pcce::Truncate(), pcce::OggStream::Update(), pcce::SoundResource::vDoLoad(), pcce::SoundResource::vDoUnload(), pcce::RenderSubSystem::vInitialize(), pcce::IThreadedSubSystem::vInitialize(), and pcce::XmlNode::XmlNode().

#define PCCE_THROW ( error   )     throw(pcce::Exception((error), __FILE__, __LINE__))


Generated on Thu Mar 6 11:39:09 2008 for Protocce by  doxygen 1.5.5