annotate src/implab/di/ActivationError.js @ 5:3d124d0b9078

improved declare/override, added override.before, override.after, override.hide, inherited.arguments.
author cin
date Fri, 16 Jun 2017 02:14:25 +0300
parents fc2517695ee1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
1 define([
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
2 "../declare"
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
3 ], function (declare) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
4 return declare(null, {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
5 activationStack: null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
6
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
7 service: null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
8
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
9 innerException: null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
10
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
11 message: null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
12
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
13 constructor: function (service, activationStack, innerException) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
14 this.message = "Failed to activate the service";
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
15 this.activationStack = activationStack;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
16 this.service = service;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
17 this.innerException = innerException;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
18 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
19
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
20 toString: function () {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
21 var parts = [this.message];
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
22 if (this.service)
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
23 parts.push("when activating: " + this.service.toString());
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
24
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
25 if (this.innerException)
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
26 parts.push("caused by: " + this.innerException.toString());
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
27
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
28 if (this.activationStack) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
29 parts.push("at");
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
30 this.activationStack.forEach(function (x) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
31 parts.push(" " + x.name + " " +
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
32 (x.service ? x.service.toString() : ""));
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
33 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
34 }
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
35
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
36 return parts.join("\n");
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
37 }
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
38 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
39 });