Use a custom exception for publish failure

This should make it easier to filter in errbit, and be a bit cleaner.