Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
configureIO example
}
;
if
(
$phpHandler
=
set_exception_handler
(
$renderException
)
)
{
restore_exception_handler
(
)
;
if
(
!\
is_array
(
$phpHandler
)
|| !
$phpHandler
[
0
]
instanceof ErrorHandler
)
{
$errorHandler
= true;
}
elseif
(
$errorHandler
=
$phpHandler
[
0
]
->
setExceptionHandler
(
$renderException
)
)
{
$phpHandler
[
0
]
->
setExceptionHandler
(
$errorHandler
)
;
}
}
$this
->
configureIO
(
$input
,
$output
)
;
try
{
$exitCode
=
$this
->
doRun
(
$input
,
$output
)
;
}
catch
(
\Throwable
$e
)
{
if
(
$e
instanceof \Exception && !
$this
->catchExceptions
)
{
throw
$e
;
}
if
(
!
$e
instanceof \Exception && !
$this
->catchErrors
)
{
throw
$e
;
}
}
;
if
(
$phpHandler
=
set_exception_handler
(
$renderException
)
)
{
restore_exception_handler
(
)
;
if
(
!\
is_array
(
$phpHandler
)
|| !
$phpHandler
[
0
]
instanceof ErrorHandler
)
{
$errorHandler
= true;
}
elseif
(
$errorHandler
=
$phpHandler
[
0
]
->
setExceptionHandler
(
$renderException
)
)
{
$phpHandler
[
0
]
->
setExceptionHandler
(
$errorHandler
)
;
}
}
$this
->
configureIO
(
$input
,
$output
)
;
try
{
$exitCode
=
$this
->
doRun
(
$input
,
$output
)
;
}
catch
(
\Exception
$e
)
{
if
(
!
$this
->catchExceptions
)
{
throw
$e
;
}
$renderException
(
$e
)
;
$exitCode
=
$e
->
getCode
(
)
;