Revert "use std::invalid_argument for bad arguments"
This reverts commit d931550db2
This commit is contained in:
@@ -165,25 +165,6 @@ arma_stop_bounds_error(const T1& x)
|
||||
|
||||
|
||||
|
||||
//! print a message to get_cerr_stream() and throw invalid_argument exception
|
||||
template<typename T1>
|
||||
arma_cold
|
||||
arma_noinline
|
||||
static
|
||||
void
|
||||
arma_stop_arg_error(const T1& x)
|
||||
{
|
||||
#if defined(ARMA_PRINT_ERRORS)
|
||||
{
|
||||
get_cerr_stream() << "\nerror: " << x << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
throw std::invalid_argument( std::string(x) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! print a message to get_cerr_stream() and throw bad_alloc exception
|
||||
template<typename T1>
|
||||
arma_cold
|
||||
@@ -441,16 +422,6 @@ arma_check_bounds(const bool state, const T1& x)
|
||||
}
|
||||
|
||||
|
||||
template<typename T1>
|
||||
arma_hot
|
||||
inline
|
||||
void
|
||||
arma_check_arg(const bool state, const T1& x)
|
||||
{
|
||||
if(state) { arma_stop_arg_error(arma_str::str_wrapper(x)); }
|
||||
}
|
||||
|
||||
|
||||
template<typename T1>
|
||||
arma_hot
|
||||
inline
|
||||
@@ -1322,7 +1293,6 @@ arma_assert_atlas_size(const T1& A, const T2& B)
|
||||
#define arma_debug_warn true ? (void)0 : arma_warn
|
||||
#define arma_debug_check true ? (void)0 : arma_check
|
||||
#define arma_debug_check_bounds true ? (void)0 : arma_check_bounds
|
||||
#define arma_debug_check_arg true ? (void)0 : arma_check_arg
|
||||
#define arma_debug_set_error true ? (void)0 : arma_set_error
|
||||
#define arma_debug_assert_same_size true ? (void)0 : arma_assert_same_size
|
||||
#define arma_debug_assert_mul_size true ? (void)0 : arma_assert_mul_size
|
||||
@@ -1337,7 +1307,6 @@ arma_assert_atlas_size(const T1& A, const T2& B)
|
||||
#define arma_debug_warn arma_warn
|
||||
#define arma_debug_check arma_check
|
||||
#define arma_debug_check_bounds arma_check_bounds
|
||||
#define arma_debug_check_arg arma_check_arg
|
||||
#define arma_debug_set_error arma_set_error
|
||||
#define arma_debug_assert_same_size arma_assert_same_size
|
||||
#define arma_debug_assert_mul_size arma_assert_mul_size
|
||||
|
||||
Reference in New Issue
Block a user