Moving struct declaration to the top of the file
Forgot to 'throw' the exception, not just generate it.
Printing the wrong parameter error message

Thanks to Martin Maurer for spotting this one

Fixes #211