getMessage()}.
";
} catch (Exception $e) {
// Перехват всех остальных исключений
echo 'Неизвестное исключение:
', $e, ''; } function printDocument() { $printer = '//./printer'; // Генерируем исключение типов IFileException и INetException if (!file_exists($printer)) { throw new NetPrinterWriteException($printer); } }