Enum onWorkerException

UDA. Functions with @onWorkerException attached are called when worker throws an exception

enum onWorkerException : void { ... }
@onWorkerException bool myExceptionHandler(Request r, Output o, Exception e)
{
   o.status = 500;
   info("Oh no! An exception occurred: ", e.msg);
   return true; // This means the exception is handled, if false, the exception is rethrown
}

Enum members

NameDescription