Skip to content

Commit

Permalink
Merge pull request #251 from wmde/debug-info-for-donation-scrub-check
Browse files Browse the repository at this point in the history
Add debug info for scrub exception
  • Loading branch information
moiikana authored Aug 20, 2024
2 parents cbbabda + 36db000 commit 0430251
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Domain/Model/Donation.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ public function getDonatedOn(): DateTimeImmutable {
public function scrubPersonalData( \DateTimeInterface $exportGracePeriodCutoffDate ): void {
if ( !$this->scrubbingIsAllowed( $exportGracePeriodCutoffDate ) ) {
throw new \DomainException( sprintf(
"You must not anonymize unexported donations before %s, otherwise you'd lose data.",
$exportGracePeriodCutoffDate->format( 'Y-m-d H:i:s' )
"You must not anonymize unexported donations before %s, otherwise you'd lose data. Offending donation ID: %s",
$exportGracePeriodCutoffDate->format( 'Y-m-d H:i:s' ),
$this->getId()
) );
}
$this->donor = new ScrubbedDonor( $this->donor->getDonorType() );
Expand Down

0 comments on commit 0430251

Please sign in to comment.