added the ability to provide optional extra data to captured errors and messages