added custom exception for bad invoices