11
11
* @docs -private
12
12
*/
13
13
export function throwNullPortalError ( ) {
14
- throw new Error ( 'Must provide a portal to attach' ) ;
14
+ throw Error ( 'Must provide a portal to attach' ) ;
15
15
}
16
16
17
17
/**
18
18
* Throws an exception when attempting to attach a portal to a host that is already attached.
19
19
* @docs -private
20
20
*/
21
21
export function throwPortalAlreadyAttachedError ( ) {
22
- throw new Error ( 'Host already has a portal attached' ) ;
22
+ throw Error ( 'Host already has a portal attached' ) ;
23
23
}
24
24
25
25
/**
26
26
* Throws an exception when attempting to attach a portal to an already-disposed host.
27
27
* @docs -private
28
28
*/
29
29
export function throwPortalHostAlreadyDisposedError ( ) {
30
- throw new Error ( 'This PortalHost has already been disposed' ) ;
30
+ throw Error ( 'This PortalHost has already been disposed' ) ;
31
31
}
32
32
33
33
/**
34
34
* Throws an exception when attempting to attach an unknown portal type.
35
35
* @docs -private
36
36
*/
37
37
export function throwUnknownPortalTypeError ( ) {
38
- throw new Error ( 'Attempting to attach an unknown Portal type. BasePortalHost accepts either' +
38
+ throw Error ( 'Attempting to attach an unknown Portal type. BasePortalHost accepts either' +
39
39
'a ComponentPortal or a TemplatePortal.' ) ;
40
40
}
41
41
@@ -44,13 +44,13 @@ export function throwUnknownPortalTypeError() {
44
44
* @docs -private
45
45
*/
46
46
export function throwNullPortalHostError ( ) {
47
- throw new Error ( 'Attempting to attach a portal to a null PortalHost' ) ;
47
+ throw Error ( 'Attempting to attach a portal to a null PortalHost' ) ;
48
48
}
49
49
50
50
/**
51
51
* Throws an exception when attempting to detach a portal that is not attached.
52
52
* @docs -privatew
53
53
*/
54
54
export function throwNoPortalAttachedError ( ) {
55
- throw new Error ( 'Attempting to detach a portal that is not attached to a host' ) ;
55
+ throw Error ( 'Attempting to detach a portal that is not attached to a host' ) ;
56
56
}
0 commit comments