From 5bd192a78852f3b6afaa72e114f3c2a6eba6cd92 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Mon, 5 Jan 2026 01:05:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20example=20=D1=81=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BA=D0=BE=D0=B9=20=D0=B8=D1=81=D0=BA=D0=BB?= =?UTF-8?q?=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/source/app.d | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/example/source/app.d b/example/source/app.d index 113a4d1..7ca321f 100644 --- a/example/source/app.d +++ b/example/source/app.d @@ -4,7 +4,21 @@ import std.stdio : writeln; void main() { - auto config = SessionConfig(InputMode.raw, Cursor.normal, Echo.on); - auto session = new Session(config); - session.close(); + auto config = SessionConfig(InputMode.raw, Cursor.normal, Echo.on, Keypad.on); + Session session; + try { + session = new Session(config); + } catch (Exception e) { + writeln("Не удалось инициализировать сессию:\n\t", e.msg); + return; + } + + try { + session.close(); + } catch (Exception e) { + writeln("Не удалось закрыть сессию:\n\t", e.msg); + return; + } + + writeln("OK"); }