mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Merge pull request #54 from amphp/ex-msg
Make exception messages more generic
This commit is contained in:
commit
e3cb5dc385
@ -11,7 +11,7 @@ class MultiReasonException extends \Exception {
|
||||
* @param string|null $message
|
||||
*/
|
||||
public function __construct(array $reasons, string $message = null) {
|
||||
parent::__construct($message ?: "Too many promises were rejected");
|
||||
parent::__construct($message ?: "Multiple errors encountered");
|
||||
|
||||
$this->reasons = $reasons;
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ class TimeoutException extends \Exception {
|
||||
* @param string|null $message
|
||||
*/
|
||||
public function __construct(string $message = null) {
|
||||
parent::__construct($message ?: "Promise resolution timed out");
|
||||
parent::__construct($message ?: "Operation timed out");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user