Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Попытка
Попытка
ВызватьИсключение "Нет товара";
Исключение
Сообщить("лог");
ВызватьИсключение;
КонецПопытки;
Сообщить("чек");
Исключение
Сообщить(ИнформацияОбОшибке().Описание);
КонецПопытки;лог Нет товара
- Expecting a caught exception to be over, so a bare
ВызватьИсключениеdoes nothing: it passes the same exception up - Expecting the inner handler to be skipped when an outer
Попыткаexists: the nearestПопыткаcatches the exception
- Why do checks compare
ИнформацияОбОшибке().Описаниеrather than the full error text? - When is it right to pass an exception on after logging it?