"use strict";

exports.NOT_IMPLEMENTED = function (target, nameForErrorMessage) {
  return function () {
    var raise = target ? target.raise : this.raise;
    raise.call(this, "error", "NOT IMPLEMENTED" + (nameForErrorMessage ? ": " + nameForErrorMessage : ""));
  };
};

"use strict";

exports.NOT_IMPLEMENTED = function (target, nameForErrorMessage) {
  return function () {
    var raise;

    var message = "Called NOT_IMPLEMENTED without an element to raise on" +
      (nameForErrorMessage ? ": " + nameForErrorMessage : "");

    target = target || this;
    if (target) {
      raise = target.raise;
    } else {
      if (typeof console !== "undefined" && console.log) {
        console.log(new Error(message));
      }

      return;
    }

    raise.call(this, "error", message);
  };
};

Fix NOT_IMPLEMENTED to not crash user-code if no target is given
Fix NOT_IMPLEMENTED to not crash user-code if no target is given
