Исключения core вынесены в отдельный модуль exception

This commit is contained in:
Alexander Zhirov 2025-05-24 11:02:01 +03:00
parent cc1a81261a
commit cdd2ec5875
Signed by: alexander
GPG key ID: C8D8BE544A27C511
3 changed files with 16 additions and 10 deletions

View file

@ -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;

View file

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

View file

@ -1,3 +1,4 @@
module snag.core;
public import snag.core.core;
public import snag.core.exception;