Skip to content

Commit 49c7598

Browse files
committed
Set the rejection reason to an Error object.
1 parent 44b2e8e commit 49c7598

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/loaders.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const loadParser = config => new Promise((resolve, reject) => {
6767

6868
} else {
6969

70-
reject('Invalid parser specified.');
70+
reject(new Error('Invalid parser specified.'));
7171

7272
}
7373

@@ -79,7 +79,7 @@ const loadParser = config => new Promise((resolve, reject) => {
7979

8080
} else {
8181

82-
reject('Invalid parser specified.');
82+
reject(new Error('Invalid parser specified.'));
8383

8484
}
8585

@@ -114,7 +114,7 @@ const loadPlugin = config => new Promise((resolve, reject) => {
114114

115115
} else {
116116

117-
reject('Invalid layout specified.');
117+
reject(new Error('Invalid layout specified.'));
118118

119119
}
120120

@@ -130,7 +130,7 @@ const loadPlugin = config => new Promise((resolve, reject) => {
130130

131131
} else {
132132

133-
reject('Invalid layout specified.');
133+
reject(new Error('Invalid layout specified.'));
134134

135135
}
136136

0 commit comments

Comments
 (0)