Back to questions
JuniorTheoryCommon
What does the program print?
Процедура Списать(Остаток)
Если Остаток < 1 Тогда
ВызватьИсключение "Нет товара";
КонецЕсли;
КонецПроцедуры
Попытка
Списать(0);
Сообщить("чек");
Исключение
Сообщить("отмена");
КонецПопытки;отмена
- Expecting the lines after the failing call in the
Попыткаblock to run: the exception passes control toИсключениеat once - Expecting the program to return into the
Попыткаblock after the handler: it goes on afterКонецПопытки
- How does the handler get the text of the exception it caught?
- What happens if
Списать(0)is called outside anyПопытка?