# Is there a reason we use a <object>DoesNotExist rather than just
# using a single ObjectDoesNotExist exception for everything?

try:
    p = polls.get_object(...)
    c = choices.get_object(...)
except ObjectDoesNotExist, e:
    ...

Which one failed?

Having per-model DoesNotExist exceptions makes it painfully obvious
what sort of error has occurred.  Makes the code that much more
readable, too, IMHO.

-- 
  Jonathan Daugherty
  http://www.parsed.org

Reply via email to