Fix raising of exceptions and logging in msg2mime transform.