Removed extra bracket and corrected parameter name so that sample code w...

...orks

These minor code changes enable the sample code to run. 

1) The bracket after 'error' is a typo, and the closing bracket already exists in the proper position. 
2) The parameter 'e' has been changed to 'err' to match its use on the next line.