MCPcopy
hub / github.com/pocketbase/pocketbase / normalizeServeExceptions

Method normalizeServeExceptions

plugins/jsvm/jsvm.go:355–363  ·  view source on GitHub ↗

normalizeExceptions registers a global error handler that wraps the extracted goja exception error value for consistency when throwing or returning errors.

(e *core.RequestEvent)

Source from the content-addressed store, hash-verified

353// wraps the extracted goja exception error value for consistency
354// when throwing or returning errors.
355func (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.

Callers

nothing calls this directly

Calls 3

normalizeExceptionFunction · 0.85
NextMethod · 0.65
WrittenMethod · 0.65

Tested by

no test coverage detected