catching the smarty exception.