FatalError extends Error
This commit is contained in:
		@@ -1,19 +1,12 @@
 | 
				
			|||||||
function error( msg )
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class FatalError extends Error
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	this.name = "Fatal Error";
 | 
						constructor( msg )
 | 
				
			||||||
	this.message = msg;
 | 
						{
 | 
				
			||||||
 | 
							super( msg );
 | 
				
			||||||
	var e = new Error();
 | 
							this.name = "FatalError";
 | 
				
			||||||
	e = e.stack.split( "\n" );
 | 
						}
 | 
				
			||||||
	e[0] = this.name;
 | 
					 | 
				
			||||||
	e[1] = msg;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	this.stack = e.join( "\n" );
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
error.prototype.toString = function()
 | 
					module.exports = FatalError;
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return this.name + " " + this.message;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
module.exports = error;
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user