Author: roni
Date: Wed Feb 20 00:26:32 2008
New Revision: 2096
Modified:
trunk/Core/Exceptions/ArrayIndexOutOfBounds.h
trunk/Core/Exceptions/AssertionFailed.h
trunk/Core/Exceptions/BadPrimitive.cc
trunk/Core/Exceptions/BadPrimitive.h
trunk/Core/Exceptions/ErrnoException.cc
trunk/Core/Exceptions/ErrnoException.h
trunk/Core/Exceptions/Exception.cc
trunk/Core/Exceptions/Exception.h
trunk/Core/Exceptions/FileNotFound.cc
trunk/Core/Exceptions/FileNotFound.h
trunk/Core/Exceptions/IllegalArgument.cc
trunk/Core/Exceptions/IllegalArgument.h
trunk/Core/Exceptions/IllegalValue.h
trunk/Core/Exceptions/InputError.cc
trunk/Core/Exceptions/InputError.h
trunk/Core/Exceptions/InternalError.cc
trunk/Core/Exceptions/InternalError.h
trunk/Core/Exceptions/InvalidState.cc
trunk/Core/Exceptions/InvalidState.h
trunk/Core/Exceptions/NullPointerException.cc
trunk/Core/Exceptions/NullPointerException.h
trunk/Core/Exceptions/OutputError.cc
trunk/Core/Exceptions/OutputError.h
trunk/Core/Exceptions/SerializationError.cc
trunk/Core/Exceptions/SerializationError.h
trunk/Core/Exceptions/StackWalker.cc
trunk/Core/Exceptions/StackWalker.h
trunk/Core/Exceptions/UnknownColor.cc
trunk/Core/Exceptions/UnknownColor.h
trunk/Core/Exceptions/UnknownComponent.cc
trunk/Core/Exceptions/UnknownComponent.h
trunk/Core/Exceptions/UnknownPixelFormat.cc
trunk/Core/Exceptions/UnknownPixelFormat.h
trunk/Core/Thread/ThreadError.cc
trunk/Core/Thread/ThreadError.h
Log:
Made Manta::Exception inherit from std::exception. Implemented
std::exception::what() by calling Manta::Exception::message().
Changed all implementing destructors to be throw().
Modified: trunk/Core/Exceptions/ArrayIndexOutOfBounds.h
==============================================================================
--- trunk/Core/Exceptions/ArrayIndexOutOfBounds.h (original)
+++ trunk/Core/Exceptions/ArrayIndexOutOfBounds.h Wed Feb 20 00:26:32
2008
@@ -51,7 +51,7 @@
ArrayIndexOutOfBounds(long value, long lower, long upper, const char* file, int line);
ArrayIndexOutOfBounds(const ArrayIndexOutOfBounds&);
- virtual ~ArrayIndexOutOfBounds();
+ virtual ~ArrayIndexOutOfBounds() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/AssertionFailed.h
==============================================================================
--- trunk/Core/Exceptions/AssertionFailed.h (original)
+++ trunk/Core/Exceptions/AssertionFailed.h Wed Feb 20 00:26:32 2008
@@ -57,7 +57,7 @@
const char* file,
int line);
AssertionFailed(const AssertionFailed&);
- virtual ~AssertionFailed();
+ virtual ~AssertionFailed() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/BadPrimitive.cc
==============================================================================
--- trunk/Core/Exceptions/BadPrimitive.cc (original)
+++ trunk/Core/Exceptions/BadPrimitive.cc Wed Feb 20 00:26:32 2008
@@ -14,7 +14,7 @@
{
}
-BadPrimitive::~BadPrimitive()
+BadPrimitive::~BadPrimitive() throw()
{
}
Modified: trunk/Core/Exceptions/BadPrimitive.h
==============================================================================
--- trunk/Core/Exceptions/BadPrimitive.h (original)
+++ trunk/Core/Exceptions/BadPrimitive.h Wed Feb 20 00:26:32 2008
@@ -11,7 +11,7 @@
public:
BadPrimitive(const std::string&);
BadPrimitive(const BadPrimitive&);
- virtual ~BadPrimitive();
+ virtual ~BadPrimitive() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/ErrnoException.cc
==============================================================================
--- trunk/Core/Exceptions/ErrnoException.cc (original)
+++ trunk/Core/Exceptions/ErrnoException.cc Wed Feb 20 00:26:32 2008
@@ -70,7 +70,7 @@
{
}
-ErrnoException::~ErrnoException()
+ErrnoException::~ErrnoException() throw()
{
}
Modified: trunk/Core/Exceptions/ErrnoException.h
==============================================================================
--- trunk/Core/Exceptions/ErrnoException.h (original)
+++ trunk/Core/Exceptions/ErrnoException.h Wed Feb 20 00:26:32 2008
@@ -51,7 +51,7 @@
public:
ErrnoException(const std::string&, int err, const char* file, int line);
ErrnoException(const ErrnoException&);
- virtual ~ErrnoException();
+ virtual ~ErrnoException() throw();
virtual const char* message() const;
virtual const char* type() const;
Modified: trunk/Core/Exceptions/Exception.cc
==============================================================================
--- trunk/Core/Exceptions/Exception.cc (original)
+++ trunk/Core/Exceptions/Exception.cc Wed Feb 20 00:26:32 2008
@@ -81,7 +81,7 @@
stacktrace_ = strdup(getStackTrace().c_str());
}
-Exception::~Exception()
+Exception::~Exception() throw()
{
if(stacktrace_) {
free((char*)stacktrace_);
Modified: trunk/Core/Exceptions/Exception.h
==============================================================================
--- trunk/Core/Exceptions/Exception.h (original)
+++ trunk/Core/Exceptions/Exception.h Wed Feb 20 00:26:32 2008
@@ -42,13 +42,19 @@
#ifndef Manta_Exception_h
#define Manta_Exception_h
+#include <exception>
#include <string>
namespace Manta {
- class Exception {
+ class Exception : public std::exception {
public:
Exception();
- virtual ~Exception();
+ virtual ~Exception() throw();
+
+ const char *what() const throw() {
+ return message();
+ }
+
virtual const char* message() const=0;
virtual const char* type() const=0;
const char* stackTrace() const {
Modified: trunk/Core/Exceptions/FileNotFound.cc
==============================================================================
--- trunk/Core/Exceptions/FileNotFound.cc (original)
+++ trunk/Core/Exceptions/FileNotFound.cc Wed Feb 20 00:26:32 2008
@@ -65,7 +65,7 @@
{
}
-FileNotFound::~FileNotFound()
+FileNotFound::~FileNotFound() throw()
{
}
Modified: trunk/Core/Exceptions/FileNotFound.h
==============================================================================
--- trunk/Core/Exceptions/FileNotFound.h (original)
+++ trunk/Core/Exceptions/FileNotFound.h Wed Feb 20 00:26:32 2008
@@ -52,7 +52,7 @@
public:
FileNotFound(const std::string&, const char* file, int line);
FileNotFound(const FileNotFound&);
- virtual ~FileNotFound();
+ virtual ~FileNotFound() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/IllegalArgument.cc
==============================================================================
--- trunk/Core/Exceptions/IllegalArgument.cc (original)
+++ trunk/Core/Exceptions/IllegalArgument.cc Wed Feb 20 00:26:32 2008
@@ -20,7 +20,7 @@
{
}
-IllegalArgument::~IllegalArgument()
+IllegalArgument::~IllegalArgument() throw()
{
}
Modified: trunk/Core/Exceptions/IllegalArgument.h
==============================================================================
--- trunk/Core/Exceptions/IllegalArgument.h (original)
+++ trunk/Core/Exceptions/IllegalArgument.h Wed Feb 20 00:26:32 2008
@@ -12,7 +12,7 @@
public:
IllegalArgument(const std::string&, int, const vector<string>& args);
IllegalArgument(const IllegalArgument&);
- virtual ~IllegalArgument();
+ virtual ~IllegalArgument() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/IllegalValue.h
==============================================================================
--- trunk/Core/Exceptions/IllegalValue.h (original)
+++ trunk/Core/Exceptions/IllegalValue.h Wed Feb 20 00:26:32 2008
@@ -54,7 +54,7 @@
public:
IllegalValue(const std::string&, const T& value);
IllegalValue(const IllegalValue&);
- virtual ~IllegalValue();
+ virtual ~IllegalValue() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
@@ -79,7 +79,7 @@
}
template <class T>
- IllegalValue<T>::~IllegalValue()
+ IllegalValue<T>::~IllegalValue() throw()
{
}
Modified: trunk/Core/Exceptions/InputError.cc
==============================================================================
--- trunk/Core/Exceptions/InputError.cc (original)
+++ trunk/Core/Exceptions/InputError.cc Wed Feb 20 00:26:32 2008
@@ -42,7 +42,7 @@
{
}
-InputError::~InputError()
+InputError::~InputError() throw()
{
}
Modified: trunk/Core/Exceptions/InputError.h
==============================================================================
--- trunk/Core/Exceptions/InputError.h (original)
+++ trunk/Core/Exceptions/InputError.h Wed Feb 20 00:26:32 2008
@@ -44,7 +44,7 @@
public:
InputError(const std::string&);
InputError(const InputError&);
- virtual ~InputError();
+ virtual ~InputError() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/InternalError.cc
==============================================================================
--- trunk/Core/Exceptions/InternalError.cc (original)
+++ trunk/Core/Exceptions/InternalError.cc Wed Feb 20 00:26:32 2008
@@ -65,7 +65,7 @@
{
}
-InternalError::~InternalError()
+InternalError::~InternalError() throw()
{
}
Modified: trunk/Core/Exceptions/InternalError.h
==============================================================================
--- trunk/Core/Exceptions/InternalError.h (original)
+++ trunk/Core/Exceptions/InternalError.h Wed Feb 20 00:26:32 2008
@@ -52,7 +52,7 @@
public:
InternalError(const std::string&, const char* file, int line);
InternalError(const InternalError&);
- virtual ~InternalError();
+ virtual ~InternalError() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/InvalidState.cc
==============================================================================
--- trunk/Core/Exceptions/InvalidState.cc (original)
+++ trunk/Core/Exceptions/InvalidState.cc Wed Feb 20 00:26:32 2008
@@ -65,7 +65,7 @@
{
}
-InvalidState::~InvalidState()
+InvalidState::~InvalidState() throw()
{
}
Modified: trunk/Core/Exceptions/InvalidState.h
==============================================================================
--- trunk/Core/Exceptions/InvalidState.h (original)
+++ trunk/Core/Exceptions/InvalidState.h Wed Feb 20 00:26:32 2008
@@ -52,7 +52,7 @@
public:
InvalidState(const std::string&, const char* file, int line);
InvalidState(const InvalidState&);
- virtual ~InvalidState();
+ virtual ~InvalidState() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/NullPointerException.cc
==============================================================================
--- trunk/Core/Exceptions/NullPointerException.cc (original)
+++ trunk/Core/Exceptions/NullPointerException.cc Wed Feb 20 00:26:32
2008
@@ -14,7 +14,7 @@
{
}
-NullPointerException::~NullPointerException()
+NullPointerException::~NullPointerException() throw()
{
}
Modified: trunk/Core/Exceptions/NullPointerException.h
==============================================================================
--- trunk/Core/Exceptions/NullPointerException.h (original)
+++ trunk/Core/Exceptions/NullPointerException.h Wed Feb 20 00:26:32
2008
@@ -12,7 +12,7 @@
public:
NullPointerException(const std::type_info& t);
NullPointerException(const NullPointerException&);
- virtual ~NullPointerException();
+ virtual ~NullPointerException() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/OutputError.cc
==============================================================================
--- trunk/Core/Exceptions/OutputError.cc (original)
+++ trunk/Core/Exceptions/OutputError.cc Wed Feb 20 00:26:32 2008
@@ -42,7 +42,7 @@
{
}
-OutputError::~OutputError()
+OutputError::~OutputError() throw()
{
}
Modified: trunk/Core/Exceptions/OutputError.h
==============================================================================
--- trunk/Core/Exceptions/OutputError.h (original)
+++ trunk/Core/Exceptions/OutputError.h Wed Feb 20 00:26:32 2008
@@ -44,7 +44,7 @@
public:
OutputError(const std::string&);
OutputError(const OutputError&);
- virtual ~OutputError();
+ virtual ~OutputError() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/SerializationError.cc
==============================================================================
--- trunk/Core/Exceptions/SerializationError.cc (original)
+++ trunk/Core/Exceptions/SerializationError.cc Wed Feb 20 00:26:32 2008
@@ -42,7 +42,7 @@
{
}
-SerializationError::~SerializationError()
+SerializationError::~SerializationError() throw()
{
}
Modified: trunk/Core/Exceptions/SerializationError.h
==============================================================================
--- trunk/Core/Exceptions/SerializationError.h (original)
+++ trunk/Core/Exceptions/SerializationError.h Wed Feb 20 00:26:32 2008
@@ -41,7 +41,7 @@
public:
SerializationError(const std::string&);
SerializationError(const SerializationError&);
- virtual ~SerializationError();
+ virtual ~SerializationError() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/StackWalker.cc
==============================================================================
--- trunk/Core/Exceptions/StackWalker.cc (original)
+++ trunk/Core/Exceptions/StackWalker.cc Wed Feb 20 00:26:32 2008
@@ -204,7 +204,7 @@
pUDSN = NULL;
pSGSP = NULL;
}
- ~StackWalkerInternal()
+ ~StackWalkerInternal() throw()
{
if (pSC != NULL)
pSC(m_hProcess); // SymCleanup
@@ -764,7 +764,7 @@
this->m_szSymPath = NULL;
}
-StackWalker::~StackWalker()
+StackWalker::~StackWalker() throw()
{
if (m_szSymPath != NULL)
free(m_szSymPath);
Modified: trunk/Core/Exceptions/StackWalker.h
==============================================================================
--- trunk/Core/Exceptions/StackWalker.h (original)
+++ trunk/Core/Exceptions/StackWalker.h Wed Feb 20 00:26:32 2008
@@ -73,7 +73,7 @@
HANDLE hProcess = GetCurrentProcess()
);
StackWalker(DWORD dwProcessId, HANDLE hProcess);
- virtual ~StackWalker();
+ virtual ~StackWalker() throw();
typedef BOOL (__stdcall *PReadProcessMemoryRoutine)(
HANDLE hProcess,
Modified: trunk/Core/Exceptions/UnknownColor.cc
==============================================================================
--- trunk/Core/Exceptions/UnknownColor.cc (original)
+++ trunk/Core/Exceptions/UnknownColor.cc Wed Feb 20 00:26:32 2008
@@ -14,7 +14,7 @@
{
}
-UnknownColor::~UnknownColor()
+UnknownColor::~UnknownColor() throw()
{
}
Modified: trunk/Core/Exceptions/UnknownColor.h
==============================================================================
--- trunk/Core/Exceptions/UnknownColor.h (original)
+++ trunk/Core/Exceptions/UnknownColor.h Wed Feb 20 00:26:32 2008
@@ -11,7 +11,7 @@
public:
UnknownColor(const std::string&);
UnknownColor(const UnknownColor&);
- virtual ~UnknownColor();
+ virtual ~UnknownColor() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/UnknownComponent.cc
==============================================================================
--- trunk/Core/Exceptions/UnknownComponent.cc (original)
+++ trunk/Core/Exceptions/UnknownComponent.cc Wed Feb 20 00:26:32 2008
@@ -18,7 +18,7 @@
{
}
-UnknownComponent::~UnknownComponent()
+UnknownComponent::~UnknownComponent() throw()
{
}
Modified: trunk/Core/Exceptions/UnknownComponent.h
==============================================================================
--- trunk/Core/Exceptions/UnknownComponent.h (original)
+++ trunk/Core/Exceptions/UnknownComponent.h Wed Feb 20 00:26:32 2008
@@ -11,7 +11,7 @@
public:
UnknownComponent(const std::string& error, const std::string& spec);
UnknownComponent(const UnknownComponent&);
- virtual ~UnknownComponent();
+ virtual ~UnknownComponent() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Exceptions/UnknownPixelFormat.cc
==============================================================================
--- trunk/Core/Exceptions/UnknownPixelFormat.cc (original)
+++ trunk/Core/Exceptions/UnknownPixelFormat.cc Wed Feb 20 00:26:32 2008
@@ -42,7 +42,7 @@
{
}
-UnknownPixelFormat::~UnknownPixelFormat()
+UnknownPixelFormat::~UnknownPixelFormat() throw()
{
}
Modified: trunk/Core/Exceptions/UnknownPixelFormat.h
==============================================================================
--- trunk/Core/Exceptions/UnknownPixelFormat.h (original)
+++ trunk/Core/Exceptions/UnknownPixelFormat.h Wed Feb 20 00:26:32 2008
@@ -45,7 +45,7 @@
public:
UnknownPixelFormat(const std::string&);
UnknownPixelFormat(const UnknownPixelFormat&);
- virtual ~UnknownPixelFormat();
+ virtual ~UnknownPixelFormat() throw();
virtual const char* message() const;
virtual const char* type() const;
protected:
Modified: trunk/Core/Thread/ThreadError.cc
==============================================================================
--- trunk/Core/Thread/ThreadError.cc (original)
+++ trunk/Core/Thread/ThreadError.cc Wed Feb 20 00:26:32 2008
@@ -54,7 +54,7 @@
{
}
-ThreadError::~ThreadError()
+ThreadError::~ThreadError() throw()
{
}
Modified: trunk/Core/Thread/ThreadError.h
==============================================================================
--- trunk/Core/Thread/ThreadError.h (original)
+++ trunk/Core/Thread/ThreadError.h Wed Feb 20 00:26:32 2008
@@ -74,7 +74,7 @@
//////////
// Destructor
- virtual ~ThreadError();
+ virtual ~ThreadError() throw();
//////////
// returns the message associated with this error
Archive powered by MHonArc 2.6.16.