File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,19 @@ function startGhost(options) {
17
17
options = options || { } ;
18
18
19
19
bootstrap ( options . config ) . then ( function ( ) {
20
- var ghost = require ( './server' ) ;
21
- return ghost ( options . app ) . then ( deferred . resolve ) . otherwise ( function ( e ) {
22
- // We don't return the rejected promise to stop
23
- // the propogation of the rejection and just
24
- // allow the user to manage what to do.
20
+ try {
21
+ var ghost = require ( './server' ) ;
22
+ return ghost ( options . app )
23
+ . then ( deferred . resolve )
24
+ . otherwise ( function ( e ) {
25
+ // We don't return the rejected promise to stop
26
+ // the propogation of the rejection and just
27
+ // allow the user to manage what to do.
28
+ deferred . reject ( e ) ;
29
+ } ) ;
30
+ } catch ( e ) {
25
31
deferred . reject ( e ) ;
26
- } ) ;
32
+ }
27
33
} ) ;
28
34
29
35
return deferred . promise ;
You can’t perform that action at this time.
0 commit comments