Updated Error handling (markdown)
@@ -5,7 +5,7 @@ When control flow meet `throw` statement, program execution is immediately inter
|
|||||||
and Execution Error is raised with message passed to `throw` statement.
|
and Execution Error is raised with message passed to `throw` statement.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```
|
```php
|
||||||
function divide(a: int, b: int) {
|
function divide(a: int, b: int) {
|
||||||
if (b == 0) {
|
if (b == 0) {
|
||||||
throw "You are trying to divide by 0!";
|
throw "You are trying to divide by 0!";
|
||||||
|
|||||||
Reference in New Issue
Block a user