Исключения core вынесены в отдельный модуль exception
This commit is contained in:
		
							parent
							
								
									cc1a81261a
								
							
						
					
					
						commit
						cdd2ec5875
					
				
					 3 changed files with 16 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								source/snag/core/exception.d
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								source/snag/core/exception.d
									
										
									
									
									
										Normal 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);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
module snag.core;
 | 
			
		||||
 | 
			
		||||
public import snag.core.core;
 | 
			
		||||
public import snag.core.exception;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue