Error and Warning Handling
[Base Module]


Defines

#define it_assert(t, s)
 Abort if t is not true.
#define it_assert_debug(t, s)   it_assert(t,s)
 Abort if t is not true and NDEBUG is not defined.
#define it_assert0(t, s)   it_assert_debug(t,s)
 Deprecated macro. Please use it_assert_debug() instead.
#define it_assert1(t, s)   it_assert_debug(t,s)
 Deprecated macro. Please use it_assert_debug() instead.
#define it_error_if(t, s)
 Abort if t is true.
#define it_error(s)
 Abort unconditionally.
#define it_info(s)
 Print information message.
#define it_info_no_endl(s)
 Print information message withot std::endl at the end.
#define it_info_debug(s)   it_info(s)
 Print information message if NDEBUG is not defined.
#define it_info_no_endl_debug(s)   it_info_no_endl(s)
 Print information message withot std::endl at the end if NDEBUG is not defined.
#define it_warning(s)
 Display a warning message.

Enumerations

enum  itpp::error_msg_style { Full, Minimum }
 Style of assert, error and warning messages.

Functions

void itpp::it_assert_f (std::string ass, std::string msg, std::string file, int line)
 Helper function for the it_assert and it_assert_debug macros.
void itpp::it_error_f (std::string msg, std::string file, int line)
 Helper function for the it_error and it_error_if macros.
void itpp::it_info_f (std::string msg)
 Helper function for the it_info and it_info_debug macros.
void itpp::it_warning_f (std::string msg, std::string file, int line)
 Helper function for the it_warning macro.
void itpp::it_enable_exceptions (bool on)
 Enable/disable using exceptions for error handling.
void itpp::it_enable_warnings ()
 Enable warnings.
void itpp::it_disable_warnings ()
 Disable warnings.
void itpp::it_redirect_warnings (std::ostream *warn_stream)
 Redirect warnings to the ostream warn_stream.
void itpp::it_error_msg_style (error_msg_style style)
 Set preferred style of assert, error and warning messages.

Detailed Description

For the following macros, the argument s is a string that is displayed.

  it_assert(t,s);           // Abort if t is not true
  it_assert_debug(t,s);     // Abort if t is not true and NDEBUG is not defined
  it_error_if(t,s);         // Abort if t is true
  it_error(s);              // Abort
  it_info(s);               // Display a message
  it_info_debug(s);         // Display a message if NDEBUG is not defined
  it_info_no_endl(s);       // Display a message without appended "std::endl"
  it_info_no_endl_debug(s); // Display a message without appended "std::endl" if NDEBUG is not defined
  it_warning(s);            // Display a warning

it_assert(), it_error(), it_error_if(), it_info(), it_info_no_endl() and it_warning() are always active, whereas it_assert_debug(), it_info_debug() and it_info_no_endl_debug() depends on the NDEBUG compile time definition. If NDEBUG is defined, then none of these macros is executed.

Note:
it_assert0() and it_assert1() macros are still defined for backward compatibility, but it_assert_debug() should be used instead of them.

Define Documentation

#define it_assert ( t,
 ) 

Value:

if (!(t)) {       \
    std::ostringstream m_sout;     \
    m_sout << s;      \
    itpp::it_assert_f(#t,m_sout.str(),__FILE__,__LINE__); \
  } else       \
    ((void) 0)
Abort if t is not true.

Referenced by itpp::GF2mat::add_rows(), itpp::arma_estimator(), itpp::MOG_generic::avg_log_lhood(), itpp::MOG_diag::avg_log_lhood(), itpp::backward_substitution(), itpp::Base_Event::Base_Event(), itpp::BCH::BCH(), itpp::bidiag(), itpp::binom(), itpp::binom_i(), itpp::LDPC_Code::bp_decode(), itpp::GF2mat::bvecify(), itpp::TDL_Channel::calc_frequency_response(), itpp::TDL_Channel::calc_impulse_response(), itpp::cheb(), itpp::chebwin(), itpp::LDPC_Parity::check_connectivity(), itpp::LDPC_Parity::check_for_cycles(), itpp::Pulse_Shape< T1, T2, T3 >::clear(), itpp::GF2mat::concatenate_horizontal(), itpp::GF2mat::concatenate_vertical(), itpp::BLERC::count(), itpp::cross(), itpp::cumsum(), itpp::LDPC_Parity_Unstructured::cycle_removal_MGW(), itpp::Turbo_Codec::decode(), itpp::Turbo_Codec::decode_block(), itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), itpp::TDL_Channel::discretize(), itpp::LDPC_Parity::display_stats(), itpp::LDPC_Code::encode(), itpp::BLDPC_Generator::encode(), itpp::LDPC_Generator_Systematic::encode(), itpp::Turbo_Codec::encode_block(), itpp::TTimer< TCP_Sender >::ExpirationTime(), itpp::LDPC_Parity::export_alist(), itpp::filter_design_autocorrelation(), itpp::find(), itpp::forward_substitution(), itpp::gcd(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::LDPC_Parity_Unstructured::generate_random_H(), itpp::Parser::get(), itpp::Parser::get_bool(), itpp::Sparse_Mat< T >::get_col(), itpp::Channel_Specification::get_doppler_spectrum(), itpp::Parser::get_int(), itpp::Root_Raised_Cosine< T1 >::get_roll_off(), itpp::Raised_Cosine< T1 >::get_roll_off(), itpp::Line_Search::get_solution(), itpp::Newton_Search::get_solution(), itpp::ARMA_Filter< T1, T2, T3 >::get_state(), itpp::AR_Filter< T1, T2, T3 >::get_state(), itpp::MA_Filter< T1, T2, T3 >::get_state(), itpp::GF2mat::get_submatrix(), itpp::GF2mat::GF2mat(), itpp::Gold::Gold(), itpp::hadamard(), itpp::Parser::init(), itpp::MOG_generic::init(), itpp::TDL_Channel::init(), itpp::int2bits(), itpp::LDPC_Code::integrity_check(), itpp::interchange_permutations(), itpp::Sort< T >::intro_sort(), itpp::Sort< T >::intro_sort_index(), itpp::GF2mat::inverse(), itpp::MOG_generic::join(), itpp::levels2bits(), itpp::MOG_generic::lhood(), itpp::MOG_diag::lhood(), itpp::MOG_generic::load(), itpp::BLDPC_Generator::load(), itpp::LDPC_Generator_Systematic::load(), itpp::BLDPC_Parity::load_base_matrix(), itpp::LDPC_Code::load_code(), itpp::log_binom(), itpp::Rec_Syst_Conv_Code::log_decode(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), itpp::MOG_generic::log_lhood(), itpp::MOG_diag::log_lhood(), itpp::MOG_generic::log_lhood_single_gaus(), itpp::MOG_diag::log_lhood_single_gaus(), itpp::max(), itpp::min(), itpp::MOG_diag_EM_sup::ml(), itpp::modified_yule_walker(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), itpp::norm(), itpp::it_ifile_old::open(), itpp::it_file::open(), itpp::it_ifile::open(), itpp::GF::operator/=(), itpp::GF2mat::operator==(), itpp::operator>>(), itpp::bin::operator>>(), itpp::it_file::pack(), itpp::permutation_matrix(), itpp::GF2mat::permute_cols(), itpp::GF2mat::permute_rows(), itpp::prod(), itpp::GF2mat_sparse_alist::read(), itpp::Mat< Num_T >::repmat(), itpp::Vec< Num_T >::repmat(), itpp::Sparse_Vec< T >::resize_data(), itpp::rotation_matrix(), itpp::MOG_diag_kmeans_sup::run(), itpp::BLDPC_Generator::save(), itpp::LDPC_Generator_Systematic::save(), itpp::BLDPC_Parity::save_base_matrix(), itpp::LDPC_Code::save_code(), itpp::Line_Search::search(), itpp::Newton_Search::search(), itpp::Modulator< T >::set(), itpp::LDPC_Parity::set(), itpp::TCP_Segment::set_begin(), itpp::Packet::set_bit_size(), itpp::TDL_Channel::set_channel_profile(), itpp::Channel_Specification::set_channel_profile(), itpp::TDL_Channel::set_channel_profile_exponential(), itpp::TDL_Channel::set_channel_profile_uniform(), itpp::Spread_2d::set_code(), itpp::CRC_Code::set_code(), itpp::Convolutional_Code::set_code(), itpp::Multicode_Spread_2d::set_codes(), itpp::ARMA_Filter< T1, T2, T3 >::set_coeffs(), itpp::AR_Filter< T1, T2, T3 >::set_coeffs(), itpp::MA_Filter< T1, T2, T3 >::set_coeffs(), itpp::Sparse_Mat< T >::set_col(), itpp::GF2mat::set_col(), itpp::LDPC_Code::set_decoding_method(), itpp::MOG_generic::set_diag_covs_internal(), itpp::TDL_Channel::set_doppler_spectrum(), itpp::TCP_Segment::set_end(), itpp::ACK_Channel::set_errors(), itpp::Packet_Channel::set_errors(), itpp::LDPC_Code::set_exit_conditions(), itpp::TDL_Channel::set_filter_length(), itpp::FIR_Fading_Generator::set_filter_length(), itpp::MOG_generic::set_full_covs_internal(), itpp::CRC_Code::set_generator(), itpp::TDL_Channel::set_LOS(), itpp::Channel_Specification::set_LOS(), itpp::TDL_Channel::set_LOS_doppler(), itpp::Correlated_Fading_Generator::set_LOS_doppler(), itpp::TDL_Channel::set_LOS_power(), itpp::Fading_Generator::set_LOS_power(), itpp::ND_UPSK::set_M(), itpp::ND_UQAM::set_M(), itpp::ND_UPAM::set_M(), itpp::PAM::set_M(), itpp::PAM_c::set_M(), itpp::PSK::set_M(), itpp::QAM::set_M(), itpp::Line_Search::set_max_iterations(), itpp::Line_Search::set_max_stepsize(), itpp::MOG_generic::set_means_internal(), itpp::TDL_Channel::set_no_frequencies(), itpp::Rice_Fading_Generator::set_no_frequencies(), itpp::TDL_Channel::set_norm_doppler(), itpp::Correlated_Fading_Generator::set_norm_doppler(), itpp::Turbo_Codec::set_parameters(), itpp::Poisson_Packet_Generator::set_parameters(), itpp::Packet_Generator::set_parameters(), itpp::ACK_Channel::set_parameters(), itpp::Packet_Channel::set_parameters(), itpp::OFDM::set_parameters(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Raised_Cosine< T1 >::set_pulse_shape(), itpp::GF2mat::set_row(), itpp::GF::set_size(), itpp::LFSR::set_state(), itpp::DSFMT< MEXP, POS1, SL1, MSK1, MSK2, MSK32_1, MSK32_2, MSK32_3, MSK32_4, FIX1, FIX2, PCV1, PCV2 >::set_state(), itpp::ARMA_Filter< T1, T2, T3 >::set_state(), itpp::AR_Filter< T1, T2, T3 >::set_state(), itpp::MA_Filter< T1, T2, T3 >::set_state(), itpp::TDL_Channel::set_time_offset(), itpp::MOG_generic::set_weights_internal(), itpp::Bernoulli_RNG::setup(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols(), itpp::Gold::shift(), itpp::LFSR::shift(), itpp::TDL_Channel::shift_time_offset(), itpp::Sink::Sink(), itpp::Sort< T >::sort(), itpp::Sort< T >::sort_index(), itpp::ND_UPAM::sphere_decoding(), itpp::Mat< Num_T >::sub_m_v_vT(), itpp::Mat< Num_T >::sub_v_vT_m(), itpp::sum(), itpp::sum_sqr(), itpp::GF2mat::swap_cols(), itpp::GF2mat::swap_rows(), itpp::GF2mat::T_fact_update_addcol(), itpp::to_cvec(), itpp::tridiag(), itpp::waterfilling(), itpp::wcdma_spreading_codes(), itpp::Turbo_Codec::wcdma_turbo_interleaver_sequence(), itpp::GF2mat_sparse_alist::write(), itpp::xcorr_old(), itpp::yulewalk(), itpp::zero_pad(), and itpp::zigzag_space().

#define it_error (  ) 

Value:

if (true) {      \
    std::ostringstream m_sout;    \
    m_sout << s;     \
    itpp::it_error_f(m_sout.str(),__FILE__,__LINE__); \
  } else      \
    ((void) 0)
Abort unconditionally.

Referenced by bdm::BMEF::_copy_(), itpp::Fix_Base::apply_o_mode(), itpp::assert_shifts(), bdm::MultiModel::bayes(), itpp::LDPC_Code::bp_decode(), bdm::UIinternal::build(), bdm::UIexternal::build(), chmat::chmat(), itpp::chol(), bdm::BM::condition(), bdm::mpdf::condition(), itpp::Reed_Solomon::decode(), itpp::Punctured_Convolutional_Code::decode(), itpp::LDPC_Code::decode(), itpp::Hamming_Code::decode(), itpp::Extended_Golay::decode(), itpp::Convolutional_Code::decode(), itpp::BCH::decode(), itpp::Turbo_Codec::decode_block(), itpp::Modulator_NCD::demodulate_soft_bits(), itpp::Modulator_NRD::demodulate_soft_bits(), IMpmsmStat::dfdu_cond(), IMpmsm2o::dfdu_cond(), IMpmsm::dfdu_cond(), IMk1::dfdu_cond(), bdm::eEF::dupdate(), itpp::eig(), itpp::eig_sym(), bdm::BM::epredictor(), bdm::egiw::est_theta(), bdm::egiw::est_theta_cov(), bdm::eEmp::evallog(), bdm::epdf::evallog(), bdm::eEF::evallog_nn(), bdm::BMEF::flatten(), fsqmat::fsqmat(), itpp::LDPC_Parity_Irregular::generate(), itpp::LDPC_Parity_Regular::generate(), itpp::Parser::get(), itpp::Parser::get_bmat(), itpp::Parser::get_bool(), itpp::Parser::get_bvec(), itpp::Parser::get_double(), itpp::Parser::get_imat(), itpp::Parser::get_ivec(), itpp::Parser::get_mat(), itpp::Parser::get_smat(), itpp::Parser::get_string(), itpp::Parser::get_svec(), itpp::Parser::get_vec(), bdm::DS::getdata(), itpp::Gold::Gold(), itpp::Fix_Base::init(), itpp::TDL_Channel::init(), itpp::Rice_Fading_Generator::init(), itpp::Rice_Fading_Generator::init_MEDS(), itpp::inv(), itpp::LDPC_Parity::LDPC_Parity(), bdm::UI_File::load(), itpp::Rec_Syst_Conv_Code::log_decode(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), bdm::BM::logpred(), itpp::ls_solve(), itpp::ls_solve_chol(), itpp::ls_solve_od(), itpp::ls_solve_ud(), itpp::lu(), itpp::MOG_diag_EM_sup::map(), bdm::epdf::mean(), bdm::mratio::mratio(), chmat::mult_sym(), chmat::mult_sym_t(), itpp::it_file_old::open(), itpp::it_ifile_old::open(), itpp::it_file::open(), itpp::it_ifile::open(), itpp::operator<<(), itpp::Vec< Num_T >::operator=(), itpp::operator>>(), bdm::eEF::pow(), bdm::BM::predictor(), itpp::qr(), itpp::rank(), bdm::eEmp::resample(), itpp::Fix_Base::rshift_and_apply_q_mode(), bdm::eEmp::sample(), bdm::eDirich::sample(), bdm::epdf::sample(), bdm::UI_File::save(), itpp::Fix_Base::scale_and_apply_modes(), itpp::schur(), itpp::Vec< Num_T >::set(), itpp::Turbo_Codec::set_metric(), itpp::Fix_Base::set_output_mode(), itpp::Turbo_Codec::set_parameters(), bdm::egiwmix::set_parameters(), bdm::emix::set_parameters(), bdm::BMEF::set_statistics(), itpp::Sort< T >::sort(), itpp::Sort< T >::sort_index(), bdm::memlog::step(), itpp::svd(), itpp::GF2mat::T_fact_update_bitflip(), bdm::egiw::variance(), bdm::epdf::variance(), bdm::MemDS::write(), bdm::DS::write(), and itpp::xcorr_old().

#define it_error_if ( t,
 ) 

#define it_info (  ) 

Value:

if (true) {     \
    std::ostringstream m_sout;   \
    m_sout << s << std::endl;   \
    itpp::it_info_f(m_sout.str());  \
  } else     \
    ((void) 0)
Print information message.

Referenced by itpp::LDPC_Parity::display_stats().

#define it_info_no_endl (  ) 

Value:

if (true) {     \
    std::ostringstream m_sout;   \
    m_sout << s;    \
    itpp::it_info_f(m_sout.str());  \
  } else     \
    ((void) 0)
Print information message withot std::endl at the end.

#define it_warning (  ) 

Value:

if (true) {      \
    std::ostringstream m_sout;    \
    m_sout << s;     \
    itpp::it_warning_f(m_sout.str(),__FILE__,__LINE__); \
  } else      \
    ((void) 0)
Display a warning message.

Referenced by bdm::EKFCh::bayes(), bdm::KalmanCh::bayes(), itpp::chol(), bdm::epdf::condition(), itpp::Punctured_Convolutional_Code::decode_tail(), itpp::Punctured_Convolutional_Code::decode_tailbite(), itpp::Punctured_Convolutional_Code::decode_trunc(), itpp::MOG_diag_kmeans_sup::dezombify_means(), itpp::TDL_Channel::discretize(), dydr(), itpp::Line_Search::get_alpha(), itpp::Fading_Generator::get_doppler_spectrum(), itpp::Fading_Generator::get_filter_length(), itpp::Newton_Search::get_function_value(), itpp::Fast_ICA::get_independent_components(), itpp::Fading_Generator::get_LOS_doppler(), itpp::Fast_ICA::get_mixing_matrix(), itpp::Fading_Generator::get_no_frequencies(), itpp::Line_Search::get_no_function_evaluations(), itpp::Newton_Search::get_no_function_evaluations(), itpp::Newton_Search::get_no_iterations(), itpp::Fading_Generator::get_norm_doppler(), itpp::Fading_Generator::get_rice_method(), itpp::Fast_ICA::get_separating_matrix(), itpp::Line_Search::get_slope_ratio(), itpp::Newton_Search::get_stop_1(), itpp::Newton_Search::get_stop_2(), itpp::Fading_Generator::get_time_offset(), itpp::Line_Search::get_trace(), itpp::Newton_Search::get_trace(), lgam(), itpp::BLDPC_Parity::load_base_matrix(), bdm::epdf::marginal(), itpp::MOG_diag_EM_sup::ml(), itpp::Modulator< T >::modulate_bits(), itpp::it_file_old::pack(), itpp::MOG_diag_kmeans_sup::run(), bdm::egiw::sample(), itpp::Fading_Generator::set_doppler_spectrum(), itpp::Fading_Generator::set_filter_length(), itpp::Fading_Generator::set_LOS_doppler(), itpp::Fading_Generator::set_no_frequencies(), itpp::Fading_Generator::set_norm_doppler(), itpp::Fading_Generator::set_rice_method(), itpp::Mat< Num_T >::set_submatrix(), itpp::Vec< Num_T >::set_subvector(), itpp::Fading_Generator::set_time_offset(), itpp::Fading_Generator::shift_time_offset(), and itpp::xcorr().


Generated on Tue Jun 2 10:02:14 2009 for mixpp by  doxygen 1.5.8