Udostępnij za pośrednictwem


underflow_error Class

Klasa służy jako klasa podstawowa dla wszystkich wyjątków thrown zgłosić arytmetyczne niedomiar.

class underflow_error : public runtime_error {
public:
    explicit underflow_error(const string& message);
    explicit underflow_error(const char *message);
};

Uwagi

Wartość zwracana przez jaki jest kopią komunikat.danych.

Przykład

// underflow_error.cpp
// compile with: /EHsc /GR
#include <iostream>

using namespace std;

int main( )
{
   try 
   {
      throw underflow_error( "The number's a bit small, captain!" );
   }
   catch ( exception &e ) {
      cerr << "Caught: " << e.what( ) << endl;
      cerr << "Type: " << typeid( e ).name( ) << endl;
   };
}
  
  

Wymagania

Nagłówek: <stdexcept>

Obszar nazw: std

Zobacz też

Informacje

runtime_error Class

Bezpieczeństwo wątków w standardowa biblioteka języka C++

Inne zasoby

<stdexcept> Członkowie