function CustomError( msg ) {
		this.name = 'CustomError';
		if ( msg ) {
			this.message = msg;
		}
		this.stack = ( new ctor() ).stack;
		return this;
	}
Create a new object, which prototypically inherits from the Error constructor.

@private
@constructor
@param {string} msg - error message
@returns {CustomError} custom error instance