@@ -30,11 +30,9 @@ class ByteBufferException
|
|||||||
ByteBufferException(size_t pos, size_t size, size_t valueSize)
|
ByteBufferException(size_t pos, size_t size, size_t valueSize)
|
||||||
: Pos(pos), Size(size), ValueSize(valueSize)
|
: Pos(pos), Size(size), ValueSize(valueSize)
|
||||||
{
|
{
|
||||||
PrintError();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void PrintError() const = 0;
|
|
||||||
|
|
||||||
size_t Pos;
|
size_t Pos;
|
||||||
size_t Size;
|
size_t Size;
|
||||||
@@ -45,7 +43,10 @@ class ByteBufferPositionException : public ByteBufferException
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ByteBufferPositionException(bool add, size_t pos, size_t size, size_t valueSize)
|
ByteBufferPositionException(bool add, size_t pos, size_t size, size_t valueSize)
|
||||||
: ByteBufferException(pos, size, valueSize), _add(add) {}
|
: ByteBufferException(pos, size, valueSize), _add(add)
|
||||||
|
{
|
||||||
|
PrintError();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void PrintError() const
|
void PrintError() const
|
||||||
@@ -62,7 +63,10 @@ class ByteBufferSourceException : public ByteBufferException
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ByteBufferSourceException(size_t pos, size_t size, size_t valueSize)
|
ByteBufferSourceException(size_t pos, size_t size, size_t valueSize)
|
||||||
: ByteBufferException(pos, size, valueSize) {}
|
: ByteBufferException(pos, size, valueSize)
|
||||||
|
{
|
||||||
|
PrintError();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void PrintError() const
|
void PrintError() const
|
||||||
|
|||||||
Reference in New Issue
Block a user