move exception handling into base model