Пространства имён
Варианты
Действия

Error handling

Материал из cppreference.com
< cpp

 
 
 
Обработка ошибок
Обработка исключений
Original:
Exception handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
exception
uncaught_exception
exception_ptr(C++11)
make_exception_ptr(C++11)
current_exception(C++11)
rethrow_exception(C++11)
nested_exception(C++11)
throw_with_nested(C++11)
rethrow_if_nested(C++11)
Неудачи обработки исключений
Original:
Exception handling failures
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
terminate
terminate_handler
get_terminate(C++11)
set_terminate
unexpected(устарело)
bad_exception
unexpected_handler(устарело)
get_unexpected(C++11)(устарело)
set_unexpected(устарело)
Исключение категорий
Original:
Exception categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
logic_error
invalid_argument
domain_error
length_error
out_of_range
runtime_error
range_error
overflow_error
underflow_error
Коды ошибок
Original:
Error codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Коды ошибок
errno
Утверждений
Original:
Assertions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
assert
system_error центр
Original:
system_error facility
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
error_category(C++11)
generic_category(C++11)
system_category(C++11)
error_condition(C++11)
errc(C++11)
error_code(C++11)
system_error(C++11)
 

Содержание

[править] Обработка исключений

В заголовке <exception> предоставляет несколько классов и функций, связанных с обработкой исключений в C + + программ.
Original:
The header <exception> provides several classes and functions related to exception handling in C++ programs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Определено в файле <exception>
Базовый класс для исключений, библиотеки стандартных компонентов
Original:
base class for exceptions thrown by the standard library components
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
Захват и хранение исключением объектов
Original:
Capture and storage of exception objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
проверяет, является ли обработка исключений является в настоящее время
Original:
checks if exception handling is currently in progress
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
общий тип указателя для обработки исключения объектов
Original:
shared pointer type for handling exception objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(определение типа) [edit]
создает std::exception_ptr от объекта исключения
Original:
creates an std::exception_ptr from an exception object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон функции) [edit]
captures the current exception in a std::exception_ptr
(функция) [edit]
бросает исключение из std::exception_ptr
Original:
throws the exception from an std::exception_ptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
Тип примесь для сбора и хранения текущей исключения
Original:
a mixin type to capture and store current exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
бросает свой спор с std::nested_exception ввязался
Original:
throws its argument with std::nested_exception mixed in
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон функции) [edit]
бросает исключение из std::nested_exception
Original:
throws the exception from a std::nested_exception
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон функции) [edit]
Обработка сбоев в обработке исключений
Original:
Handling of failures in exception handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Функция вызывается при обработке исключений не удается
Original:
function called when exception handling fails
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
Тип функции вызываются std::terminate
Original:
the type of the function called by std::terminate
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(определение типа) [edit]
получает текущий terminate_handler
Original:
obtains the current terminate_handler
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
изменения функцию, которая будет вызываться std::terminate
Original:
changes the function to be called by std::terminate
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
Обработка нарушения спецификации исключений
Original:
Handling of exception specification violations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(устарело)
Функция вызывается, когда динамическая спецификация исключений нарушается
Original:
function called when dynamic exception specification is violated
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
исключение, когда динамическая спецификация исключений нарушается, если это возможно
Original:
exception thrown when dynamic exception specification is violated, if possible
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
(устарело)
Тип функции вызываются std::unexpected
Original:
the type of the function called by std::unexpected
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(определение типа) [edit]
(C++11)(устарело)
получает текущий unexpected_handler
Original:
obtains the current unexpected_handler
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
(устарело)
изменения функцию, которая будет вызываться std::unexpected
Original:
changes the function to be called by std::unexpected
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]

[править] Исключение категорий

Несколько классов удобства предварительно определены в заголовке <stdexcept> сообщить конкретные условия ошибки. Эти классы можно разделить на две категории: Логика и ошибки времени выполнения ошибок. Логические ошибки являются следствием порочной логике в рамках программы и можно предотвратить. Ошибки времени выполнения в связи с событиями выходит за рамки программы и не может быть легко предсказано.
Original:
Several convenience classes are predefined in the header <stdexcept> to report particular error conditions. These classes can be divided into two categories: logic errors and runtime errors. Logic errors are a consequence of faulty logic within the program and may be preventable. Runtime errors are due to events beyond the scope of the program and can not be easily predicted.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Определено в файле <stdexcept>
Исключение класса, чтобы указать нарушения логических предпосылок или класс инвариантов
Original:
exception class to indicate violations of logical preconditions or class invariants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщать неверные аргументы
Original:
exception class to report invalid arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщить домена ошибок
Original:
exception class to report domain errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщить попытки превышает максимально допустимый размер
Original:
exception class to report attempts to exceed maximum allowed size
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщить аргументы за пределы ожидаемого диапазона
Original:
exception class to report arguments outside of expected range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса указать условия обнаружить только во время выполнения
Original:
exception class to indicate conditions only detectable at run time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщить диапазон ошибки во внутренних расчетах
Original:
exception class to report range errors in internal computations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщить арифметическое переполнение
Original:
exception class to report arithmetic overflows
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)
Исключение класса сообщить арифметических недостаточному
Original:
exception class to report arithmetic underflows
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс)

[править] Ошибка номера

Определено в файле <cerrno>
макрос, который расширяется в POSIX-совместимых потоков местного variable
(макропеременной) номер ошибки
Original:
macro which expands to POSIX-compatible thread-local error number variable
(макропеременной)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
макросы для стандартных POSIX-совместимых условий ошибки
Original:
macros for standard POSIX-compatible error conditions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(константа-макрос) [edit]

[править] Утверждений

Утверждения способствовать осуществлению проверки предпосылок в программах.
Original:
Assertions help to implement checking of preconditions in programs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
статическое утверждение
выполняется во время компиляции проверку утверждений (начиная с C++11)
Original:
performs compile-time assertion checking (начиная с C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
Определено в файле <cassert>
прерывает программу, если указанный пользователем условие не является true. Может быть отключена для версии релиза
Original:
aborts the program if the user-specified condition is not true. May be disabled for release builds
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция-макрос) [edit]

[править] Системная ошибка

В заголовке <system_error> определяет виды и функции, используемые для сообщить об ошибке состояния, возникающие от операционной системы, потоки ввода / вывода, std::future или других низкоуровневых API-интерфейсов.
Original:
The header <system_error> defines types and functions used to report error conditions originating from the operating system, streams I/O, std::future, or other low-level APIs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Определено в файле <system_error>
Базовый класс для категорий ошибок
Original:
base class for error categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
определяет общие категории ошибка
Original:
identifies the generic error category
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
определяет операционные системы категорий ошибке
Original:
identifies the operating system error category
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция) [edit]
имеет портативный код ошибки
Original:
holds a portable error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
(C++11)
std::error_condition перечисление списка всех стандартных макросов <cerrno> констант
Original:
the std::error_condition enumeration listing all standard <cerrno> macro constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
проводит зависит от платформы код ошибки
Original:
holds a platform-dependent error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]
Исключение класса используется, чтобы сообщить условия, которые должны error_code
Original:
exception class used to report conditions that have an error_code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(класс) [edit]