GetResponseForExceptionEvent

GetResponseForExceptionEvent

class GetResponseForExceptionEvent extends GetResponseEvent

Allows to create a response for a thrown exception.

Call setResponse() to set the response that will be returned for the current request. The propagation of this event is stopped as soon as a response is set.

You can also call setException() to replace the thrown exception. This exception will be thrown if no response is set during processing of this event.

Methods

bool isPropagationStopped()

Returns whether further event listeners should be triggered.

from 登录查看完整内容