TYPO3  7.6
Public Member Functions | Private Attributes | List of all members
ConsoleExceptionEvent Class Reference
Inheritance diagram for ConsoleExceptionEvent:
ConsoleEvent

Public Member Functions

 __construct (Command $command, InputInterface $input, OutputInterface $output,\Exception $exception, $exitCode)
 
 getException ()
 
 setException (\Exception $exception)
 
 getExitCode ()
 
- Public Member Functions inherited from ConsoleEvent
 __construct (Command $command, InputInterface $input, OutputInterface $output)
 
 getCommand ()
 
 getInput ()
 
 getOutput ()
 

Private Attributes

 $exception
 
 $exitCode
 

Additional Inherited Members

- Protected Attributes inherited from ConsoleEvent
 $command
 

Detailed Description

Allows to handle exception thrown in a command.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 23 of file ConsoleExceptionEvent.php.

Constructor & Destructor Documentation

__construct ( Command  $command,
InputInterface  $input,
OutputInterface  $output,
\Exception  $exception,
  $exitCode 
)

Member Function Documentation

getException ( )

Returns the thrown exception.

Returns
The thrown exception

Definition at line 41 of file ConsoleExceptionEvent.php.

References ConsoleExceptionEvent\$exception.

Referenced by Application\doRunCommand(), and ApplicationTest\getDispatcher().

getExitCode ( )

Gets the exit code.

Returns
int The command exit code

Definition at line 63 of file ConsoleExceptionEvent.php.

References ConsoleExceptionEvent\$exitCode.

Referenced by ApplicationTest\getDispatcher().

setException ( \Exception  $exception)

Replaces the thrown exception.

This exception will be thrown if no response is set in the event.

Parameters
\Exception$exceptionThe thrown exception

Definition at line 53 of file ConsoleExceptionEvent.php.

References ConsoleExceptionEvent\$exception.

Referenced by ConsoleExceptionEvent\__construct(), and ApplicationTest\getDispatcher().

Member Data Documentation

$exception
private
$exitCode
private