From cdd2ec5875dc8d5fb9bc1f91c9e378b444e8e7e5 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Sat, 24 May 2025 11:02:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BA=D0=BB=D1=8E=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20core=20=D0=B2=D1=8B=D0=BD=D0=B5=D1=81?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8C?= =?UTF-8?q?=20exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/snag/core/core.d | 11 +---------- source/snag/core/exception.d | 14 ++++++++++++++ source/snag/core/package.d | 1 + 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 source/snag/core/exception.d diff --git a/source/snag/core/core.d b/source/snag/core/core.d index c60d315..06aad49 100644 --- a/source/snag/core/core.d +++ b/source/snag/core/core.d @@ -4,20 +4,11 @@ import snag.config; import std.format; import std.stdio; import std.array; -import std.exception; import std.process; import std.algorithm; import std.string; -class SnagException : Exception { - this(string msg, string file = __FILE__, size_t line = __LINE__) { - super(msg, file, line); - } - - void print() { - writeln(msg); - } -} +import snag.core.exception; class Snag { private string[] _baseCommand; diff --git a/source/snag/core/exception.d b/source/snag/core/exception.d new file mode 100644 index 0000000..1b79433 --- /dev/null +++ b/source/snag/core/exception.d @@ -0,0 +1,14 @@ +module snag.core.exception; + +import std.exception; +import std.stdio; + +class SnagException : Exception { + this(string msg, string file = __FILE__, size_t line = __LINE__) { + super(msg, file, line); + } + + void print() { + writeln(msg); + } +} diff --git a/source/snag/core/package.d b/source/snag/core/package.d index 7e8e82a..1b88bba 100644 --- a/source/snag/core/package.d +++ b/source/snag/core/package.d @@ -1,3 +1,4 @@ module snag.core; public import snag.core.core; +public import snag.core.exception;