Many database drivers do not include the sql parameters when an exception is thrown.  It would be nice if the 'real' SQLException could be wrapped with a P6SQLException that would include the "effective sql string" (and possibly other useful metadata), as well as the original exception as a nested exception.

This behaviour could be configurable so that clients could get either the native SQLException (which is the current behaviour) or the P6SQLException.