Finally a working bit of code that compiles and runs, still can't make the error condition happen properly.