mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-14 02:37:46 +08:00
36 lines
716 B
C++
36 lines
716 B
C++
#pragma once
|
|
|
|
#include <exception>
|
|
#include <string>
|
|
|
|
|
|
namespace RedBlackTree
|
|
{
|
|
class RBTreeException : virtual public std::exception
|
|
{
|
|
public:
|
|
RBTreeException() {}
|
|
RBTreeException(std::wstring message) : errorMessage(message) {}
|
|
RBTreeException(std::wstring message, std::exception& ex) :
|
|
std::exception(ex),
|
|
errorMessage(message)
|
|
{}
|
|
virtual ~RBTreeException() throw () {}
|
|
|
|
virtual const wchar_t* what_w() const throw () {
|
|
return errorMessage.c_str();
|
|
}
|
|
|
|
protected:
|
|
std::wstring errorMessage;
|
|
};
|
|
|
|
class RBTreeDuplicatedItemException : public RBTreeException
|
|
{
|
|
public:
|
|
RBTreeDuplicatedItemException(std::wstring msg)
|
|
: RBTreeException(msg)
|
|
{}
|
|
};
|
|
}
|