Skip to content

Commit

Permalink
add another trap
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Oct 20, 2018
1 parent 49c005c commit 58bc099
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/rakudo-nqp-and-pod-notes.md
Expand Up @@ -11,6 +11,23 @@

+ **DO use 'nqp::die'** - As opposed to '**say**', '**die**' does need to be qualified with '**nqp::**'.
If used without the '**nqp::**' prefix, you sometimes may get a very unhelpful error message.

+ **BE WARNED about "return if (...)" statements** - Sometimes they work and sometimes not. But the
failure message is usually good enough to find the offending code.

For example, all these failed

```
return if !nqp::elems(@arr);
return unless nqp::elems(@arr);
```
but this finally worked:

```
if !nqp::elems(@arr) {
return;
}
```

## Pod block text content handling

Expand Down

0 comments on commit 58bc099

Please sign in to comment.