Rest exception marshalling

Following up to a discussion with @iigorr:

This pull request adds a facility to change the ways exceptions are *marshalled* without having to exchange the entire exception *mapping* mechanisum.