UNPKG

3.2 kBJavaScriptView Raw
1var __extends = (this && this.__extends) || function (d, b) {
2 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3 function __() { this.constructor = d; }
4 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5};
6import { MdError } from '../errors/error';
7/** Exception thrown when a ComponentPortal is attached to a DomPortalHost without an origin. */
8export var MdComponentPortalAttachedToDomWithoutOriginError = (function (_super) {
9 __extends(MdComponentPortalAttachedToDomWithoutOriginError, _super);
10 function MdComponentPortalAttachedToDomWithoutOriginError() {
11 _super.call(this, 'A ComponentPortal must have an origin set when attached to a DomPortalHost ' +
12 'because the DOM element is not part of the Angular application context.');
13 }
14 return MdComponentPortalAttachedToDomWithoutOriginError;
15}(MdError));
16/** Exception thrown when attempting to attach a null portal to a host. */
17export var MdNullPortalError = (function (_super) {
18 __extends(MdNullPortalError, _super);
19 function MdNullPortalError() {
20 _super.call(this, 'Must provide a portal to attach');
21 }
22 return MdNullPortalError;
23}(MdError));
24/** Exception thrown when attempting to attach a portal to a host that is already attached. */
25export var MdPortalAlreadyAttachedError = (function (_super) {
26 __extends(MdPortalAlreadyAttachedError, _super);
27 function MdPortalAlreadyAttachedError() {
28 _super.call(this, 'Host already has a portal attached');
29 }
30 return MdPortalAlreadyAttachedError;
31}(MdError));
32/** Exception thrown when attempting to attach a portal to an already-disposed host. */
33export var MdPortalHostAlreadyDisposedError = (function (_super) {
34 __extends(MdPortalHostAlreadyDisposedError, _super);
35 function MdPortalHostAlreadyDisposedError() {
36 _super.call(this, 'This PortalHost has already been disposed');
37 }
38 return MdPortalHostAlreadyDisposedError;
39}(MdError));
40/** Exception thrown when attempting to attach an unknown portal type. */
41export var MdUnknownPortalTypeError = (function (_super) {
42 __extends(MdUnknownPortalTypeError, _super);
43 function MdUnknownPortalTypeError() {
44 _super.call(this, 'Attempting to attach an unknown Portal type. ' +
45 'BasePortalHost accepts either a ComponentPortal or a TemplatePortal.');
46 }
47 return MdUnknownPortalTypeError;
48}(MdError));
49/** Exception thrown when attempting to attach a portal to a null host. */
50export var MdNullPortalHostError = (function (_super) {
51 __extends(MdNullPortalHostError, _super);
52 function MdNullPortalHostError() {
53 _super.call(this, 'Attempting to attach a portal to a null PortalHost');
54 }
55 return MdNullPortalHostError;
56}(MdError));
57/** Exception thrown when attempting to detach a portal that is not attached. */
58export var MdNoPortalAttachedError = (function (_super) {
59 __extends(MdNoPortalAttachedError, _super);
60 function MdNoPortalAttachedError() {
61 _super.call(this, 'Attempting to detach a portal that is not attached to a host');
62 }
63 return MdNoPortalAttachedError;
64}(MdError));
65
66//# sourceMappingURL=portal-errors.js.map