From 6115be6595f5c99c33295b96e553c4231fb8c0f9 Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Mon, 3 Nov 2014 12:32:11 +0000 Subject: [PATCH] Changed exception names --- cyclic_value.h | 6 +++--- ilist.h | 26 +++++++++++++------------- iqueue.h | 24 ++++++++++++------------ istack.h | 16 ++++++++-------- ivector.h | 40 ++++++++++++++++++++-------------------- list_base.h | 8 ++++---- observer.h | 6 +++--- queue_base.h | 8 ++++---- stack_base.h | 8 ++++---- 9 files changed, 71 insertions(+), 71 deletions(-) diff --git a/cyclic_value.h b/cyclic_value.h index de1df130..f59b4ca9 100644 --- a/cyclic_value.h +++ b/cyclic_value.h @@ -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 } diff --git a/ilist.h b/ilist.h index df0f405f..78d73d83 100644 --- a/ilist.h +++ b/ilist.h @@ -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 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 } diff --git a/iqueue.h b/iqueue.h index da769c1d..eef1ba4e 100644 --- a/iqueue.h +++ b/iqueue.h @@ -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.
- /// 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.
- /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.
+ /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.
/// 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.
- /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.
+ /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.
/// 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.
- /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.
+ /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.
/// 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.
- /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty_exception if the queue is empty.
+ /// If ETL_USE_EXCEPTIONS is defined, throws an etl::queue_empty if the queue is empty.
/// 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 diff --git a/istack.h b/istack.h index db1720ff..dc85addd 100644 --- a/istack.h +++ b/istack.h @@ -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.
- /// 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.
- /// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty_exception if the stack is empty.
+ /// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty if the stack is empty.
/// 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.
- /// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty_exception if the stack is empty.
+ /// If ETL_USE_EXCEPTIONS is defined, throws an etl::stack_empty if the stack is empty.
/// 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 diff --git a/ivector.h b/ivector.h index 3d1ee80d..8d27d701 100644 --- a/ivector.h +++ b/ivector.h @@ -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(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 //********************************************************************* /// 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 diff --git a/list_base.h b/list_base.h index 03bee02e..c5d0e223 100644 --- a/list_base.h +++ b/list_base.h @@ -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") { } diff --git a/observer.h b/observer.h index a0f326c4..b2f214df 100644 --- a/observer.h +++ b/observer.h @@ -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 } diff --git a/queue_base.h b/queue_base.h index b2f3e727..ff81c0f0 100644 --- a/queue_base.h +++ b/queue_base.h @@ -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") { } diff --git a/stack_base.h b/stack_base.h index 45c18269..256e79e2 100644 --- a/stack_base.h +++ b/stack_base.h @@ -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") { }