Skip to content

Commit

Permalink
Extend date parsing error message #173
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Oct 28, 2021
1 parent 4731293 commit 8cf2367
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## [UNRELEASED]
### Fixed
- NaN
- Extend date parsing error message #173

### Added
- Make boundary regex configurable #108 #152 (thanks @EthraZa)
Expand Down
3 changes: 2 additions & 1 deletion src/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@ private function parseDate($header) {
try{
$parsed_date = Carbon::parse($date);
} catch (\Exception $_e) {
throw new InvalidMessageDateException("Invalid message date. ID:".$this->get("message_id"), 1100, $e);
$error_message = "Invalid message date. ID:".$this->get("message_id")." Date:".$header->date."/".$date;
throw new InvalidMessageDateException($error_message, 1100, $e);
}
}

Expand Down

0 comments on commit 8cf2367

Please sign in to comment.