|
| 1 | +import {MdError} from '../errors/error'; |
| 2 | + |
1 | 3 | /** Exception thrown when a ComponentPortal is attached to a DomPortalHost without an origin. */ |
2 | | -export class MdComponentPortalAttachedToDomWithoutOriginError extends Error { |
| 4 | +export class MdComponentPortalAttachedToDomWithoutOriginError extends MdError { |
3 | 5 | constructor() { |
4 | 6 | super( |
5 | 7 | 'A ComponentPortal must have an origin set when attached to a DomPortalHost ' + |
6 | 8 | 'because the DOM element is not part of the Angular application context.'); |
7 | 9 | } |
8 | 10 | } |
9 | 11 |
|
10 | | -/** Exception thrown when attmepting to attach a null portal to a host. */ |
11 | | -export class MdNullPortalError extends Error { |
| 12 | +/** Exception thrown when attempting to attach a null portal to a host. */ |
| 13 | +export class MdNullPortalError extends MdError { |
12 | 14 | constructor() { |
13 | 15 | super('Must provide a portal to attach'); |
14 | 16 | } |
15 | 17 | } |
16 | 18 |
|
17 | | -/** Exception thrown when attmepting to attach a portal to a host that is already attached. */ |
18 | | -export class MdPortalAlreadyAttachedError extends Error { |
| 19 | +/** Exception thrown when attempting to attach a portal to a host that is already attached. */ |
| 20 | +export class MdPortalAlreadyAttachedError extends MdError { |
19 | 21 | constructor() { |
20 | 22 | super('Host already has a portal attached'); |
21 | 23 | } |
22 | 24 | } |
23 | 25 |
|
24 | | -/** Exception thrown when attmepting to attach a portal to an already-disposed host. */ |
25 | | -export class MdPortalHostAlreadyDisposedError extends Error { |
| 26 | +/** Exception thrown when attempting to attach a portal to an already-disposed host. */ |
| 27 | +export class MdPortalHostAlreadyDisposedError extends MdError { |
26 | 28 | constructor() { |
27 | 29 | super('This PortalHost has already been disposed'); |
28 | 30 | } |
29 | 31 | } |
30 | 32 |
|
31 | | -/** Exception thrown when attmepting to attach an unknown portal type. */ |
32 | | -export class MdUnknownPortalTypeErron extends Error { |
| 33 | +/** Exception thrown when attempting to attach an unknown portal type. */ |
| 34 | +export class MdUnknownPortalTypeError extends MdError { |
33 | 35 | constructor() { |
34 | 36 | super( |
35 | 37 | 'Attempting to attach an unknown Portal type. ' + |
36 | 38 | 'BasePortalHost accepts either a ComponentPortal or a TemplatePortal.'); |
37 | 39 | } |
38 | 40 | } |
39 | 41 |
|
40 | | -/** Exception thrown when attmepting to attach a portal to a null host. */ |
41 | | -export class MdNullPortalHostError extends Error { |
| 42 | +/** Exception thrown when attempting to attach a portal to a null host. */ |
| 43 | +export class MdNullPortalHostError extends MdError { |
42 | 44 | constructor() { |
43 | 45 | super('Attmepting to attach a portal to a null PortalHost'); |
44 | 46 | } |
45 | 47 | } |
46 | 48 |
|
47 | | -/** Exception thrown when attmepting to detach a portal that is not attached. */ |
48 | | -export class MdNoPortalAttachedErron extends Error { |
| 49 | +/** Exception thrown when attempting to detach a portal that is not attached. */ |
| 50 | +export class MdNoPortalAttachedError extends MdError { |
49 | 51 | constructor() { |
50 | 52 | super('Attmepting to detach a portal that is not attached to a host'); |
51 | 53 | } |
|
0 commit comments