Changed type of ErrorRecord to get both Exceptions and ErrorRecords