Bug 1073522 - Better error when front has no actor. r=dcamp

This commit is contained in:
J. Ryan Stinnett 2014-09-26 09:35:00 +02:00
parent 4c4fa7a34f
commit ed7c3723b1

View File

@ -1061,6 +1061,14 @@ let Front = Class({
this.actorID = null;
},
manage: function(front) {
if (!front.actorID) {
throw new Error("Can't manage front without an actor ID.\n" +
"Ensure server supports " + front.typeName + ".");
}
return Pool.prototype.manage.call(this, front);
},
/**
* @returns a promise that will resolve to the actorID this front
* represents.