Adds err parameter to examples

This change brought to you by #18
Merge pull request #25 from eric-wieser/patch-1

Adds err parameter to examples