ns_dbreturnerror conn dbhandle ?title? ?aftermsg?
ns_dberrormsg returns a text description of the last database error.
ns_dbreturnerror returns an HTML version of the last database error message to the client. The text in aftermsg is appended to the HTML after the error message.