Changed exception names

This commit is contained in:
jwellbelove 2014-11-03 12:32:11 +00:00
parent 64f3386b37
commit 6115be6595
9 changed files with 71 additions and 71 deletions

View File

@ -61,11 +61,11 @@ namespace etl
///\ingroup cyclic_value
/// The illegal range exception.
//***************************************************************************
class cyclic_value_illegal_range_exception : public cyclic_value_exception
class cyclic_value_illegal_range : public cyclic_value_exception
{
public:
cyclic_value_illegal_range_exception()
cyclic_value_illegal_range()
: cyclic_value_exception("cyclic_value illegal range")
{
}
@ -146,7 +146,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
if (((last_value - first_value + 1) % step_value) != 0)
{
throw cyclic_value_illegal_range_exception();
throw cyclic_value_illegal_range();
}
#endif
}

26
ilist.h
View File

@ -456,8 +456,8 @@ namespace etl
//*************************************************************************
/// Assigns a range of values to the list.
/// If ETL_USE_EXCEPTIONS is defined throws etl::list_full_exception if the list does not have enough free space.
/// If ETL_USE_EXCEPTIONS & _DEBUG are defined throws list_iterator_exception if the iterators are reversed.
/// If ETL_USE_EXCEPTIONS is defined throws etl::list_full if the list does not have enough free space.
/// If ETL_USE_EXCEPTIONS & _DEBUG are defined throws list_iterator if the iterators are reversed.
//*************************************************************************
template <typename TIterator>
void assign(TIterator first, TIterator last)
@ -466,7 +466,7 @@ namespace etl
if (std::distance(first, last) < 0)
{
#ifdef ETL_USE_EXCEPTIONS
throw list_iterator_exception();
throw list_iterator();
#endif
}
else
@ -483,7 +483,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (i == MAX_SIZE)
{
throw list_full_exception();
throw list_full();
}
#endif
Node& node = node_pool[i];
@ -540,7 +540,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -559,7 +559,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -579,7 +579,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -598,7 +598,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -618,7 +618,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -675,7 +675,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -718,7 +718,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -742,7 +742,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}
@ -768,7 +768,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw list_full_exception();
throw list_full();
}
#endif
}

View File

@ -61,7 +61,7 @@ namespace etl
//*************************************************************************
/// Adds an item to the queue.
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_full_exception is the queue is already full,
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_full is the queue is already full,
/// otherwise does nothing if full.
///\param item The item to push to the queue.
//*************************************************************************
@ -76,7 +76,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw queue_full_exception();
throw queue_full();
}
#endif
}
@ -85,7 +85,7 @@ namespace etl
/// Allows a possibly more efficient 'push' by moving to the next input item
/// and returning a reference to it.
/// This may eliminate a copy by allowing direct construction in-place.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_full_exception is the queue is already full,
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_full is the queue is already full,
/// otherwise does nothing if full.
/// \return A reference to the position to 'push' to.
//*************************************************************************
@ -101,7 +101,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw queue_full_exception();
throw queue_full();
}
#endif
@ -110,7 +110,7 @@ namespace etl
//*************************************************************************
/// Gets a reference to the item at the front of the queue.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is not defined and the queue is empty, the return value is undefined.
/// \return A reference to the item at the front of the queue.
//*************************************************************************
@ -119,7 +119,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (empty())
{
throw queue_empty_exception();
throw queue_empty();
}
#endif
@ -128,7 +128,7 @@ namespace etl
//*************************************************************************
/// Gets a const reference to the item at the front of the queue.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is not defined and the queue is empty, the return value is undefined.
/// \return A const reference to the item at the front of the queue.
//*************************************************************************
@ -137,7 +137,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (empty())
{
throw queue_empty_exception();
throw queue_empty();
}
#endif
@ -146,7 +146,7 @@ namespace etl
//*************************************************************************
/// Gets a reference to the item at the back of the queue.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is not defined and the queue is empty, the return value is undefined.
/// \return A reference to the item at the back of the queue.
//*************************************************************************
@ -155,7 +155,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (empty())
{
throw queue_empty_exception();
throw queue_empty();
}
#endif
@ -164,7 +164,7 @@ namespace etl
//*************************************************************************
/// Gets a const reference to the item at the back of the queue.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.<br>
/// If ETL_USE_EXCEPTIONS is not defined and the queue is empty, the return value is undefined.
/// \return A const reference to the item at the back of the queue.
//*************************************************************************
@ -173,7 +173,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (empty())
{
throw queue_empty_exception();
throw queue_empty();
}
#endif

View File

@ -61,7 +61,7 @@ namespace etl
//*************************************************************************
/// Adds an item to the stack.
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_full_exception is the stack is already full,
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_full is the stack is already full,
/// otherwise does nothing if full.
///\param item The item to push to the stack.
//*************************************************************************
@ -75,7 +75,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw stack_full_exception();
throw stack_full();
}
#endif
}
@ -84,7 +84,7 @@ namespace etl
/// Allows a possibly more efficient 'push' by moving to the next input item
/// and returning a reference to it.
/// This may eliminate a copy by allowing direct construction in-place.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_full_exception is the stack is already full,
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_full is the stack is already full,
/// otherwise does nothing if full.
/// \return A reference to the position to 'push' to.
//*************************************************************************
@ -97,7 +97,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
else
{
throw stack_full_exception();
throw stack_full();
}
#endif
@ -106,7 +106,7 @@ namespace etl
//*************************************************************************
/// Gets a reference to the item at the top of the stack.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty_exception if the stack is empty.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty if the stack is empty.<br>
/// If ETL_USE_EXCEPTIONS is not defined and the stack is empty, the return value is undefined.
/// \return A reference to the item at the top of the stack.
//*************************************************************************
@ -115,7 +115,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (empty())
{
throw stack_empty_exception();
throw stack_empty();
}
#endif
@ -124,7 +124,7 @@ namespace etl
//*************************************************************************
/// Gets a const reference to the item at the top of the stack.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty_exception if the stack is empty.<br>
/// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty if the stack is empty.<br>
/// If ETL_USE_EXCEPTIONS is not defined and the stack is empty, the return value is undefined.
/// \return A const reference to the item at the top of the stack.
//*************************************************************************
@ -133,7 +133,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (empty())
{
throw stack_empty_exception();
throw stack_empty();
}
#endif

View File

@ -172,7 +172,7 @@ namespace etl
//*********************************************************************
/// Resizes the vector.
/// If ETL_USE_EXCEPTIONS is defined and the new size is larger than the
/// maximum then a vector_full_exception is thrown.
/// maximum then a vector_full is thrown.
///\param newSize The new size.
///\param value The value to fill new elements with. Default = default contructed value.
//*********************************************************************
@ -181,7 +181,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (newSize > MAX_SIZE)
{
throw vector_full_exception();
throw vector_full();
}
#endif
@ -204,8 +204,8 @@ namespace etl
//*********************************************************************
/// Assigns values to the vector.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full_exception if the vector does not have enough free space.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_iterator_exception if the iterators are reversed.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector does not have enough free space.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_iterator if the iterators are reversed.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
//*********************************************************************
@ -217,13 +217,13 @@ namespace etl
if (count < 0)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_iterator_exception();
throw vector_iterator();
#endif
}
else if (static_cast<size_t>(count) > MAX_SIZE)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_full_exception();
throw vector_full();
#endif
}
else
@ -236,7 +236,7 @@ namespace etl
//*********************************************************************
/// Assigns values to the vector.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_exception if the vector does not have enough free space.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector does not have enough free space.
///\param n The number of elements to add.
///\param value The value to insert for each element.
//*********************************************************************
@ -245,7 +245,7 @@ namespace etl
if (n > MAX_SIZE)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_full_exception();
throw vector_full();
#endif
}
else
@ -257,7 +257,7 @@ namespace etl
//*********************************************************************
/// Inserts a value to the vector.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_exception if the vector is already full.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
@ -273,7 +273,7 @@ namespace etl
if ((current_size + 1) > MAX_SIZE)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_full_exception();
throw vector_full();
#endif
}
else
@ -289,7 +289,7 @@ namespace etl
//*********************************************************************
/// Inserts 'n' values to the vector.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_exception if the vector does not have enough free space.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector does not have enough free space.
///\param position The position to insert at.
///\param n The number of elements to add.
///\param value The value to insert.
@ -299,7 +299,7 @@ namespace etl
if ((current_size + n) > MAX_SIZE)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_full_exception();
throw vector_full();
#endif
}
else
@ -313,7 +313,7 @@ namespace etl
template <class TIterator>
//*********************************************************************
/// Inserts a range of values to the vector.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_exception if the vector does not have enough free space.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector does not have enough free space.
///\param position The position to insert at.
///\param first The first element to add.
///\param last The last + 1 element to add.
@ -324,7 +324,7 @@ namespace etl
if ((current_size + count) > MAX_SIZE)
{
throw vector_full_exception();
throw vector_full();
}
else
{
@ -336,7 +336,7 @@ namespace etl
//*********************************************************************
/// Inserts a value at the end of the vector.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_exception if the vector is already full.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector is already full.
///\param value The value to add.
//*********************************************************************
void push_back(const T& value)
@ -344,7 +344,7 @@ namespace etl
if (current_size == MAX_SIZE)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_full_exception();
throw vector_full();
#endif
}
else
@ -355,14 +355,14 @@ namespace etl
//*********************************************************************
/// Increases the size of the vector by one, but does not initialise the new element.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_exception if the vector is already full.
/// If ETL_USE_EXCEPTIONS is defined, throws vector_full if the vector is already full.
//*********************************************************************
void push_back()
{
if (current_size == MAX_SIZE)
{
#ifdef ETL_USE_EXCEPTIONS
throw vector_full_exception();
throw vector_full();
#endif
}
else
@ -459,7 +459,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (i >= current_size)
{
throw vector_out_of_bounds_exception();
throw vector_out_of_bounds();
}
#endif
@ -477,7 +477,7 @@ namespace etl
#ifdef ETL_USE_EXCEPTIONS
if (i >= current_size)
{
throw vector_out_of_bounds_exception();
throw vector_out_of_bounds();
}
#endif

View File

@ -57,11 +57,11 @@ namespace etl
/// Full exception for the list.
///\ingroup list
//***************************************************************************
class list_full_exception : public list_exception
class list_full : public list_exception
{
public:
list_full_exception()
list_full()
: list_exception("List full")
{
}
@ -71,11 +71,11 @@ namespace etl
/// Iterator exception for the list.
///\ingroup list
//***************************************************************************
class list_iterator_exception : public list_exception
class list_iterator : public list_exception
{
public:
list_iterator_exception()
list_iterator()
: list_exception("Iterator problem")
{
}

View File

@ -74,11 +74,11 @@ namespace etl
///\ingroup observer
/// The exception thrown when the observer list is full.
//***************************************************************************
class observer_list_full_exception : public observer_exception
class observer_list_full : public observer_exception
{
public:
observer_list_full_exception()
observer_list_full()
: observer_exception("observer list full")
{
}
@ -125,7 +125,7 @@ namespace etl
#if ETL_USE_EXCEPTIONS
else
{
throw observer_list_full_exception();
throw observer_list_full();
}
#endif
}

View File

@ -58,11 +58,11 @@ namespace etl
/// The exception thrown when the queue is full.
///\ingroup queue
//***************************************************************************
class queue_full_exception : public queue_exception
class queue_full : public queue_exception
{
public:
queue_full_exception()
queue_full()
: queue_exception("queue full")
{
}
@ -72,11 +72,11 @@ namespace etl
/// The exception thrown when the queue is empty.
///\ingroup queue
//***************************************************************************
class queue_empty_exception : public queue_exception
class queue_empty : public queue_exception
{
public:
queue_empty_exception()
queue_empty()
: queue_exception("queue empty")
{
}

View File

@ -58,11 +58,11 @@ namespace etl
///\ingroup stack
/// The exception thrown when the stack is full.
//***************************************************************************
class stack_full_exception : public stack_exception
class stack_full : public stack_exception
{
public:
stack_full_exception()
stack_full()
: stack_exception("stack full")
{
}
@ -72,11 +72,11 @@ namespace etl
///\ingroup stack
/// The exception thrown when the stack is empty.
//***************************************************************************
class stack_empty_exception : public stack_exception
class stack_empty : public stack_exception
{
public:
stack_empty_exception()
stack_empty()
: stack_exception("stack empty")
{
}