Skip to content

Commit bd27434

Browse files
author
Olga Kopylova
committed
MAGETWO-51881: Widget of type Catalog Events Carousel is not displayed in page
- added verbosity to exception
1 parent 072a1ae commit bd27434

File tree

1 file changed

+4
-4
lines changed
  • lib/internal/Magento/Framework/Stdlib/DateTime/Filter

1 file changed

+4
-4
lines changed

lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface
3737
*
3838
* @param string $value
3939
* @return string
40-
* @throws LocalizedException
40+
* @throws \Exception
4141
*/
4242
public function filter($value)
4343
{
4444
try {
45-
$value = new \DateTime($value);
46-
return $value->format('Y-m-d H:i:s');
45+
$dateTime = new \DateTime($value);
46+
return $dateTime->format('Y-m-d H:i:s');
4747
} catch (\Exception $e) {
48-
throw new \Exception('Invalid input datetime format');
48+
throw new \Exception((string)__("Invalid input datetime format of value '%1'", $value));
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)