lib/modules/crafity.Exception.js
function Exception(message, innerException) {
  if (!message) {
    throw new Exception("Argument 'message' is required but was '" +
      (message === null ? "null" : "undefined") + "'");
  }
  if (typeof message !== 'string') {
    throw new Exception("Argument 'message' must be of type 'string' but was '" + typeof message + "'");
  }

  if (innerException === undefined && typeof message !== 'string') {
    innerException = message;
    message = innerException.message || innerException.toString();
  }

  this.message = message;
  this.innerException = innerException;
  this.toString = function () {
    return message;
  };
}
function Exception(message, innerException) {
  if (!message) {
    throw new Exception("Argument 'message' is required but was '" +
      (message === null ? "null" : "undefined") + "'");
  }
  if (typeof message !== 'string') {
    throw new Exception("Argument 'message' must be of type 'string' but was '" + typeof message + "'");
  }

  if (innerException === undefined && typeof message !== 'string') {
    innerException = message;
    message = innerException.message || innerException.toString();
  }

  this.message = message;
  this.innerException = innerException;
  this.toString = function () {
    return message;
  };
}
function Exception ( message , innerException ) { if ( ! message ) { throw new Exception ( "Argument 'message' is required but was '" + ( message === null ? "null" : "undefined" ) + "'" ) ; } if ( typeof message !== 'string' ) { throw new Exception ( "Argument 'message' must be of type 'string' but was '" + typeof message + "'" ) ; } if ( innerException === undefined && typeof message !== 'string' ) { innerException = message ; message = innerException . message || innerException . toString ( ) ; } this . message = message ; this . innerException = innerException ; this . toString = function ( ) { return message ; } ; }
A type representing an Exception
@param message The message for the exception
@param innerException The inner exception
@param constructor A constructor of an object to inherit from Exception
A type representing an Exception