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"); }