Skip to content

Commit 59cb1ba

Browse files
committed
Merge branch 'MAGETWO-51407' into troll-bugfixes
2 parents c201d14 + 691b812 commit 59cb1ba

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ public function filter($value)
6767
$value = new \DateTime($value);
6868
return $value->format('Y-m-d');
6969
} catch (\Exception $e) {
70-
throw new LocalizedException(
71-
new Phrase('Invalid input date format')
72-
);
70+
throw new \Exception('Invalid input date format');
7371
}
7472
}
7573
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ public function filter($value)
4545
$value = new \DateTime($value);
4646
return $value->format('Y-m-d H:i:s');
4747
} catch (\Exception $e) {
48-
throw new LocalizedException(
49-
new Phrase('Invalid input date format')
50-
);
48+
throw new \Exception('Invalid input datetime format');
5149
}
5250
}
5351
}

lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/Filter/DateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function dateFilterDataProvider()
4949
*/
5050
public function testFilterWithException($inputData)
5151
{
52-
$this->setExpectedException('\Magento\Framework\Exception\LocalizedException');
52+
$this->setExpectedException('\Exception');
5353

5454
$localeMock = $this->getMock('\Magento\Framework\Stdlib\DateTime\TimezoneInterface');
5555
$localeMock->expects(

lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/Filter/DateTimeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function dateTimeFilterDataProvider()
5050
*/
5151
public function testFilterWithException($inputData)
5252
{
53-
$this->setExpectedException('\Magento\Framework\Exception\LocalizedException');
53+
$this->setExpectedException('\Exception');
5454

5555
$localeMock = $this->getMock('\Magento\Framework\Stdlib\DateTime\TimezoneInterface');
5656
$localeMock->expects(

0 commit comments

Comments
 (0)