arma_cold
arma_noinline
static
void
arma_bad(const T1& x, const bool hurl = true)
{
#if defined(ARMA_PRINT_RUNTIME_ERRORS)
    {
        std::ostream& out = get_stream_err2();

        out.flush();

        out << '\n';
        out << "error: " << x << '\n';
        out << '\n';
        out.flush();
    }
#else
    {
        arma_ignore(x);
    }
#endif

    if(hurl == true)
    {
        throw std::runtime_error("");
    }
}
예제 #2
0
파일: debug.hpp 프로젝트: Alkonis/COSyn
arma_cold
arma_noinline
static
void
arma_stop_bad_alloc(const T1& x)
  {
  #if defined(ARMA_PRINT_ERRORS)
    {
    std::ostream& out = get_stream_err2();
    
    out.flush();
    
    out << '\n';
    out << "error: " << x << '\n';
    out << '\n';
    out.flush();
    }
  #else
    {
    arma_ignore(x);
    }
  #endif
  
  throw std::bad_alloc();
  }
arma_cold
arma_noinline
static
void
arma_warn(const bool state, const T1& x, const T2& y, const T3& z)
{
    if(state==true)
    {
        get_stream_err2() << x << y << z << std::endl;
    }
}