ENG-7169: wrap errors in callback if requested.
Merge pull request #1781 from VoltDB/ENG-7169

ENG-7169: wrap errors in callback if requested.