libs/commandio.js
function CommandController(descriptor){

	Object.defineProperties(this, {
		name: {
			get: function(){
				return descriptor.name;
			}
		},
		description: {
			get: function(){
				return descriptor.description;
			}
		},
		CommandError: {
			get: function(){
				return LocalCommandError;
			}
		},
		RuntimeCommandError: {
			get: function (){
				return LocalRuntimeCommandError;
			}
		},
		errorLvl: {
			get: function(){
				return Object.create(CONST.errorLvl);
			}
		}
	});

	function LocalCommandError(message, level){
		CommandError.call(this, message, descriptor.name, level);
	}
	LocalCommandError.prototype = Object.create(CommandError.prototype);

	function LocalRuntimeCommandError(message){
		RuntimeCommandError.call(this, message, descriptor.name);
	}
	LocalRuntimeCommandError.prototype = Object.create(RuntimeCommandError.prototype);
}
function CommandController(descriptor){

	Object.defineProperties(this, {
		name: {
			get: function(){
				return descriptor.name;
			}
		},
		description: {
			get: function(){
				return descriptor.description;
			}
		},
		CommandError: {
			get: function(){
				return LocalCommandError;
			}
		},
		RuntimeCommandError: {
			get: function (){
				return LocalRuntimeCommandError;
			}
		},
		errorLvl: {
			get: function(){
				return Object.create(CONST.errorLvl);
			}
		}
	});

	function LocalCommandError(message, level){
		CommandError.call(this, message, descriptor.name, level);
	}
	LocalCommandError.prototype = Object.create(CommandError.prototype);

	function LocalRuntimeCommandError(message){
		RuntimeCommandError.call(this, message, descriptor.name);
	}
	LocalRuntimeCommandError.prototype = Object.create(RuntimeCommandError.prototype);
}
function CommandController ( descriptor ) { Object . defineProperties ( this , { name : { get : function ( ) { return descriptor . name ; } } , description : { get : function ( ) { return descriptor . description ; } } , CommandError : { get : function ( ) { return LocalCommandError ; } } , RuntimeCommandError : { get : function ( ) { return LocalRuntimeCommandError ; } } , errorLvl : { get : function ( ) { return Object . create ( CONST . errorLvl ) ; } } } ) ; function LocalCommandError ( message , level ) { CommandError . call ( this , message , descriptor . name , level ) ; } LocalCommandError . prototype = Object . create ( CommandError . prototype ) ; function LocalRuntimeCommandError ( message ) { RuntimeCommandError . call ( this , message , descriptor . name ) ; } LocalRuntimeCommandError . prototype = Object . create ( RuntimeCommandError . prototype ) ; }
CommandIO API to command action.
@param descriptor The command descriptor.
CommandIO API to command action .