doc: fix errors in sample code comments
The errors thrown have changed in a few places. Update the comments to reflect the current errors.
The noAssert
option has been removed but it is still shown in sample
code in a few places. Remove that sample code.
Checklist
-
documentation is changed or added -
commit message follows commit guidelines