Avoid deprecated Exception.message.