Improve logging for exceptions when handling PDUs