@@ 102-110 (lines=9) @@ | ||
99 | * @NOTE: This method returns nothing, |
|
100 | * while original generator returns something. |
|
101 | */ |
|
102 | public function send($value) |
|
103 | { |
|
104 | $this->validateValidity(); |
|
105 | try { |
|
106 | $this->g->send($value); |
|
107 | return; |
|
108 | } catch (\Throwable $e) {} catch (\Exception $e) {} |
|
109 | $this->e = $e; |
|
110 | } |
|
111 | ||
112 | /** |
|
113 | * Throw exception into generator. |
|
@@ 118-126 (lines=9) @@ | ||
115 | * @NOTE: This method returns nothing, |
|
116 | * while original generator returns something. |
|
117 | */ |
|
118 | public function throw_($e) |
|
119 | { |
|
120 | $this->validateValidity(); |
|
121 | try { |
|
122 | $this->g->throw($e); |
|
123 | return; |
|
124 | } catch (\Throwable $e) {} catch (\Exception $e) {} |
|
125 | $this->e = $e; |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * Return whether Throwable is thrown. |