Making task log exceptions more flexible