Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrHandledByUser = errors.New("handled by user error handler")
ErrHandledByUser is returned when a user error handler has handled the error. Callers should not display the default error message when this is returned.
Functions ¶
func CatchTimeout ¶
Types ¶
type GeneratorForceClose ¶
type GeneratorForceClose struct{}
GeneratorForceClose is a sentinel error used to force-close a generator. When injected into a suspended generator goroutine, it causes the generator to unwind through try/finally blocks (running finally code) but is NOT caught by PHP catch blocks. If the generator tries to yield in a finally block while being force-closed, a real PHP Error is thrown.
func (*GeneratorForceClose) Error ¶
func (e *GeneratorForceClose) Error() string
type PhpContinue ¶
func (*PhpContinue) Error ¶
func (c *PhpContinue) Error() string
type PhpThrow ¶
func (*PhpThrow) ErrorTrace ¶
ErrorTrace formats the exception for uncaught-exception output. It calls __toString() on the exception object, which handles the full $previous chain. If __toString() itself throws (e.g. because the message property is a non-stringifiable object), the *new* error is returned as the fatal error string, matching PHP behaviour.
The returned *PhpThrow (if non-nil) indicates that __toString() threw, and the caller should use this replacement exception for file/line info.
func (*PhpThrow) SetLocation ¶
SetLocation overrides the exception's file and line (both on the Loc and on the exception object's properties). Used when an error originates from an internal context like __toString() conversion.
func (*PhpThrow) ThrownFile ¶
ThrownFile returns the file where the exception was constructed (from the exception object's "file" property), falling back to Loc.Filename.
func (*PhpThrow) ThrownLine ¶
ThrownLine returns the line where the exception was constructed (from the exception object's "line" property), falling back to Loc.Line.
type PhpTimeout ¶
func (*PhpTimeout) Error ¶
func (t *PhpTimeout) Error() string
func (*PhpTimeout) String ¶
func (t *PhpTimeout) String() string