Add a server generates exception event

An event to track and handle exceptions on the server.
Add a script generates error event

An event for when scripts generate errors
Add a queue context to the error events

Also, add scriptqueue context to the dB function, which required some
heavy modification, but worth it hopefully.