File tree Expand file tree Collapse file tree 2 files changed +1
-41
lines changed Expand file tree Collapse file tree 2 files changed +1
-41
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,6 @@ public function withCallback(Closure $callback)
45
45
return $ this ;
46
46
}
47
47
48
- /**
49
- * @param Closure $callback
50
- * @return $this
51
- */
52
- public function withExceptionCallback (Closure $ callback )
53
- {
54
- $ this ->exceptionCallback = $ callback ;
55
-
56
- return $ this ;
57
- }
58
-
59
48
/**
60
49
* Get a Closure that represents a slice of the application onion.
61
50
*
@@ -102,16 +91,4 @@ protected function carry()
102
91
};
103
92
};
104
93
}
105
-
106
- /**
107
- * {@inheritDoc}
108
- */
109
- protected function handleException ($ passable , $ e )
110
- {
111
- if ($ this ->exceptionCallback ) {
112
- return call_user_func_array ($ this ->exceptionCallback , [$ e ]);
113
- }
114
-
115
- throw $ e ;
116
- }
117
94
}
Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ protected function makePipeline(): Pipeline
21
21
22
22
return $ pipeline
23
23
->through ($ this ->getRegisteredHooks ())
24
- ->withCallback ($ this ->showInfoAboutHook ())
25
- ->withExceptionCallback ($ this ->showHookErrorAndExit ());
24
+ ->withCallback ($ this ->showInfoAboutHook ());
26
25
}
27
26
28
27
/**
@@ -37,22 +36,6 @@ protected function showInfoAboutHook(): Closure
37
36
};
38
37
}
39
38
40
- /**
41
- * Show Exception message and exit
42
- *
43
- * @return Closure
44
- */
45
- protected function showHookErrorAndExit (): Closure
46
- {
47
- return function (Throwable $ e ) {
48
- $ message = $ e ->getMessage () ? ' - ' .$ e ->getMessage () : '' ;
49
- $ message = sprintf ('%s failed%s. ' , $ this ->getHook (), $ message );
50
-
51
- $ this ->getOutput ()->writeln (' <bg=red;fg=white> ERROR </> ' .$ message .PHP_EOL );
52
- exit (1 );
53
- };
54
- }
55
-
56
39
/**
57
40
* {@inheritDoc}
58
41
*/
You can’t perform that action at this time.
0 commit comments