normalizeExceptions registers a global error handler that wraps the extracted goja exception error value for consistency when throwing or returning errors.
(e *core.RequestEvent)
| 353 | // wraps the extracted goja exception error value for consistency |
| 354 | // when throwing or returning errors. |
| 355 | func (p *plugin) normalizeServeExceptions(e *core.RequestEvent) error { |
| 356 | err := e.Next() |
| 357 | |
| 358 | if err == nil || e.Written() { |
| 359 | return err // no error or already committed |
| 360 | } |
| 361 | |
| 362 | return normalizeException(err) |
| 363 | } |
| 364 | |
| 365 | // watchHooks initializes a hooks file watcher that will restart the |
| 366 | // application (*if possible) in case of a change in the hooks directory. |
nothing calls this directly
no test coverage detected