assign exception to local variable ex, as expected
Merge pull request #18 from lukeis/patch-1

assign exception to local variable ex, as expected